From patchwork Tue Feb 26 20:56:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10830829 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 E07F51515 for ; Tue, 26 Feb 2019 20:56:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD0F22D7E8 for ; Tue, 26 Feb 2019 20:56:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC0192D7F6; Tue, 26 Feb 2019 20:56:43 +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 5B70B2D7E8 for ; Tue, 26 Feb 2019 20:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728842AbfBZU4m (ORCPT ); Tue, 26 Feb 2019 15:56:42 -0500 Received: from mga03.intel.com ([134.134.136.65]:29739 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbfBZU4m (ORCPT ); Tue, 26 Feb 2019 15:56:42 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2019 12:56:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,416,1544515200"; d="scan'208";a="147539057" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 26 Feb 2019 12:56:40 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id BD975D4; Tue, 26 Feb 2019 22:56:39 +0200 (EET) From: Andy Shevchenko To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/2] Input: edt-ft5x06 - Enable ACPI enumeration Date: Tue, 26 Feb 2019 22:56:37 +0200 Message-Id: <20190226205638.72183-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.20.1 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 GPIO based backlight 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,