From patchwork Tue Nov 22 10:59:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolae Rosia X-Patchwork-Id: 9440813 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 4818A60237 for ; Tue, 22 Nov 2016 11:00:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32D7728210 for ; Tue, 22 Nov 2016 11:00:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27761284E9; Tue, 22 Nov 2016 11:00:18 +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.9 required=2.0 tests=BAYES_00,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 A0DFB28210 for ; Tue, 22 Nov 2016 11:00:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753032AbcKVLAQ (ORCPT ); Tue, 22 Nov 2016 06:00:16 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:53572 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752526AbcKVLAP (ORCPT ); Tue, 22 Nov 2016 06:00:15 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1c98o3-0007ac-P0 from Nicolae_Rosia@mentor.com ; Tue, 22 Nov 2016 03:00:07 -0800 Received: from rosia.mgc (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Tue, 22 Nov 2016 11:00:06 +0000 From: Nicolae Rosia To: Dmitry Torokhov CC: Marek Belisko , Baruch Siach , Peter Ujfalusi , , , Tony Lindgren , Nicolae Rosia Subject: [PATCH] Input: twl4030-vibra: remove legacy pdata support Date: Tue, 22 Nov 2016 12:59:58 +0200 Message-ID: <1479812398-1122-1-git-send-email-Nicolae_Rosia@mentor.com> X-Mailer: git-send-email 2.7.4 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 Remove dead code since all users are device tree enabled. Signed-off-by: Nicolae Rosia Acked-by: Peter Ujfalusi --- drivers/input/misc/twl4030-vibra.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index caa5a62..5acc241 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c @@ -177,12 +177,8 @@ static int __maybe_unused twl4030_vibra_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, twl4030_vibra_suspend, twl4030_vibra_resume); -static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata, - struct device_node *node) +static bool twl4030_vibra_check_coexist(struct device_node *node) { - if (pdata && pdata->coexist) - return true; - node = of_find_node_by_name(node, "codec"); if (node) { of_node_put(node); @@ -194,13 +190,12 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata, static int twl4030_vibra_probe(struct platform_device *pdev) { - struct twl4030_vibra_data *pdata = dev_get_platdata(&pdev->dev); struct device_node *twl4030_core_node = pdev->dev.parent->of_node; struct vibra_info *info; int ret; - if (!pdata && !twl4030_core_node) { - dev_dbg(&pdev->dev, "platform_data not available\n"); + if (!twl4030_core_node) { + dev_err(&pdev->dev, "no DT info\n\n"); return -EINVAL; } @@ -209,7 +204,7 @@ static int twl4030_vibra_probe(struct platform_device *pdev) return -ENOMEM; info->dev = &pdev->dev; - info->coexist = twl4030_vibra_check_coexist(pdata, twl4030_core_node); + info->coexist = twl4030_vibra_check_coexist(twl4030_core_node); INIT_WORK(&info->play_work, vibra_play_work); info->input_dev = devm_input_allocate_device(&pdev->dev);