From patchwork Sat Mar 2 18:07:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10836713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8027517E0 for ; Sat, 2 Mar 2019 18:07:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E6022ACAF for ; Sat, 2 Mar 2019 18:07:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62C102ACB0; Sat, 2 Mar 2019 18:07:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 091362ACB3 for ; Sat, 2 Mar 2019 18:07:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfCBSHS (ORCPT ); Sat, 2 Mar 2019 13:07:18 -0500 Received: from mga02.intel.com ([134.134.136.20]:26480 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfCBSHS (ORCPT ); Sat, 2 Mar 2019 13:07:18 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2019 10:07:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,432,1544515200"; d="scan'208";a="303874544" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 02 Mar 2019 10:07:16 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 327A286; Sat, 2 Mar 2019 20:07:15 +0200 (EET) From: Andy Shevchenko To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v2 1/2] Input: edt-ft5x06 - Enable ACPI enumeration Date: Sat, 2 Mar 2019 21:07:13 +0300 Message-Id: <20190302180714.90014-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190302180714.90014-1-andriy.shevchenko@linux.intel.com> References: <20190302180714.90014-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI allows to enumerate specific devices by using compatible strings. Enable that enumeration for EDT touchscreen devices. Signed-off-by: Andy Shevchenko --- drivers/input/touchscreen/edt-ft5x06.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 1e18ca0d1b4e..bcd3d9d7367f 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -38,7 +38,6 @@ #include #include #include -#include #define WORK_REGISTER_THRESHOLD 0x00 #define WORK_REGISTER_REPORT_RATE 0x08 @@ -981,7 +980,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, return -ENOMEM; } - chip_data = of_device_get_match_data(&client->dev); + chip_data = device_get_match_data(&client->dev); if (!chip_data) chip_data = (const struct edt_i2c_chip_data *)id->driver_data; if (!chip_data || !chip_data->max_support_points) { @@ -1161,7 +1160,6 @@ static const struct i2c_device_id edt_ft5x06_ts_id[] = { }; MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id); -#ifdef CONFIG_OF static const struct of_device_id edt_ft5x06_of_match[] = { { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data }, { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data }, @@ -1172,12 +1170,11 @@ static const struct of_device_id edt_ft5x06_of_match[] = { { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match); -#endif static struct i2c_driver edt_ft5x06_ts_driver = { .driver = { .name = "edt_ft5x06", - .of_match_table = of_match_ptr(edt_ft5x06_of_match), + .of_match_table = edt_ft5x06_of_match, .pm = &edt_ft5x06_ts_pm_ops, }, .id_table = edt_ft5x06_ts_id,