From patchwork Wed May 22 21:08:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 2603591 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 92AC5DF215 for ; Wed, 22 May 2013 21:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757391Ab3EVVIk (ORCPT ); Wed, 22 May 2013 17:08:40 -0400 Received: from www.linutronix.de ([62.245.132.108]:58879 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756852Ab3EVVIh (ORCPT ); Wed, 22 May 2013 17:08:37 -0400 Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by Galois.linutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UfGGy-0001JO-19; Wed, 22 May 2013 23:08:36 +0200 From: Sebastian Andrzej Siewior To: linux-iio@vger.kernel.org, linux-input@vger.kernel.org Cc: Jonathan Cameron , Dmitry Torokhov , Samuel Ortiz , Felipe Balbi , "Patil Rachna" , Sebastian Andrzej Siewior Subject: [PATCH 2/7] input/ti_am33x_tsc: remove platform_data support Date: Wed, 22 May 2013 23:08:12 +0200 Message-Id: <1369256897-25984-2-git-send-email-bigeasy@linutronix.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369256897-25984-1-git-send-email-bigeasy@linutronix.de> References: <1369256897-25984-1-git-send-email-bigeasy@linutronix.de> X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch removes access to platform data mfd_tscadc_board because the platform is DT only. Signed-off-by: Sebastian Andrzej Siewior --- drivers/input/touchscreen/ti_am335x_tsc.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index 20f4505..e778ffd 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -430,24 +429,6 @@ static int titsc_parse_dt(struct ti_tscadc_dev *tscadc_dev, return err; } -static int titsc_parse_pdata(struct ti_tscadc_dev *tscadc_dev, - struct titsc *ts_dev) -{ - struct mfd_tscadc_board *pdata = tscadc_dev->dev->platform_data; - - if (!pdata) - return -EINVAL; - - ts_dev->wires = pdata->tsc_init->wires; - ts_dev->x_plate_resistance = - pdata->tsc_init->x_plate_resistance; - ts_dev->steps_to_configure = - pdata->tsc_init->steps_to_configure; - memcpy(ts_dev->config_inp, pdata->tsc_init->wire_config, - sizeof(pdata->tsc_init->wire_config)); - return 0; -} - /* * The functions for inserting/removing driver as a module. */ @@ -473,13 +454,9 @@ static int titsc_probe(struct platform_device *pdev) ts_dev->input = input_dev; ts_dev->irq = tscadc_dev->irq; - if (tscadc_dev->dev->platform_data) - err = titsc_parse_pdata(tscadc_dev, ts_dev); - else - err = titsc_parse_dt(tscadc_dev, ts_dev); - + err = titsc_parse_dt(tscadc_dev, ts_dev); if (err) { - dev_err(&pdev->dev, "Could not find platform data\n"); + dev_err(&pdev->dev, "Could not find valid DT data.\n"); err = -EINVAL; goto err_free_mem; }