From patchwork Thu Oct 12 09:41:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10001377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 91BFA603B5 for ; Thu, 12 Oct 2017 09:41:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D6428CD5 for ; Thu, 12 Oct 2017 09:41:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79DD128CE2; Thu, 12 Oct 2017 09:41:21 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable 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 2D1BC28CD6 for ; Thu, 12 Oct 2017 09:41:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755647AbdJLJlU (ORCPT ); Thu, 12 Oct 2017 05:41:20 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:47984 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755110AbdJLJlT (ORCPT ); Thu, 12 Oct 2017 05:41:19 -0400 Received: from ayla.of.borg ([84.195.106.246]) by laurent.telenet-ops.be with bizsmtp id LZhJ1w00N5JzmfG01ZhJJo; Thu, 12 Oct 2017 11:41:18 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1e2ZzS-0005Pk-6S; Thu, 12 Oct 2017 11:41:18 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1e2ZzS-0003J2-4h; Thu, 12 Oct 2017 11:41:18 +0200 From: Geert Uytterhoeven To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] Input: st1232 - Remove obsolete platform device support Date: Thu, 12 Oct 2017 11:41:15 +0200 Message-Id: <1507801275-12668-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 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 Commit 1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code for Armadillo-800 EVA"), removed the last user of st1232_pdata and the "st1232-ts" platform device. All remaining users use DT. Signed-off-by: Geert Uytterhoeven --- drivers/input/touchscreen/st1232.c | 16 +++------------- include/linux/platform_data/st1232_pdata.h | 13 ------------- 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 include/linux/platform_data/st1232_pdata.h diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index be5615c6bf8ff5e9..d5dfa4053bbf2359 100644 --- a/drivers/input/touchscreen/st1232.c +++ b/drivers/input/touchscreen/st1232.c @@ -29,7 +29,6 @@ #include #include #include -#include #define ST1232_TS_NAME "st1232-ts" @@ -152,10 +151,9 @@ static void st1232_ts_power(struct st1232_ts_data *ts, bool poweron) } static int st1232_ts_probe(struct i2c_client *client, - const struct i2c_device_id *id) + const struct i2c_device_id *id) { struct st1232_ts_data *ts; - struct st1232_pdata *pdata = dev_get_platdata(&client->dev); struct input_dev *input_dev; int error; @@ -180,13 +178,7 @@ static int st1232_ts_probe(struct i2c_client *client, ts->client = client; ts->input_dev = input_dev; - if (pdata) - ts->reset_gpio = pdata->reset_gpio; - else if (client->dev.of_node) - ts->reset_gpio = of_get_gpio(client->dev.of_node, 0); - else - ts->reset_gpio = -ENODEV; - + ts->reset_gpio = of_get_gpio(client->dev.of_node, 0); if (gpio_is_valid(ts->reset_gpio)) { error = devm_gpio_request(&client->dev, ts->reset_gpio, NULL); if (error) { @@ -281,13 +273,11 @@ static const struct i2c_device_id st1232_ts_id[] = { }; MODULE_DEVICE_TABLE(i2c, st1232_ts_id); -#ifdef CONFIG_OF static const struct of_device_id st1232_ts_dt_ids[] = { { .compatible = "sitronix,st1232", }, { } }; MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids); -#endif static struct i2c_driver st1232_ts_driver = { .probe = st1232_ts_probe, @@ -295,7 +285,7 @@ static struct i2c_driver st1232_ts_driver = { .id_table = st1232_ts_id, .driver = { .name = ST1232_TS_NAME, - .of_match_table = of_match_ptr(st1232_ts_dt_ids), + .of_match_table = st1232_ts_dt_ids, .pm = &st1232_ts_pm_ops, }, }; diff --git a/include/linux/platform_data/st1232_pdata.h b/include/linux/platform_data/st1232_pdata.h deleted file mode 100644 index cac3e7b4c45418aa..0000000000000000 --- a/include/linux/platform_data/st1232_pdata.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _LINUX_ST1232_PDATA_H -#define _LINUX_ST1232_PDATA_H - -/* - * Optional platform data - * - * Use this if you want the driver to drive the reset pin. - */ -struct st1232_pdata { - int reset_gpio; -}; - -#endif