From patchwork Mon Feb 10 04:22:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 3615361 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AB59E9F382 for ; Mon, 10 Feb 2014 04:22:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D45712016C for ; Mon, 10 Feb 2014 04:22:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 107142010C for ; Mon, 10 Feb 2014 04:22:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751745AbaBJEW3 (ORCPT ); Sun, 9 Feb 2014 23:22:29 -0500 Received: from smtp24.mail.ru ([94.100.176.177]:58667 "EHLO smtp24.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbaBJEW3 (ORCPT ); Sun, 9 Feb 2014 23:22:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Message-Id:Date:Subject:Cc:To:From; bh=xEtUngP+eUTdB137nV1KVey+z3thxspCWnjf/Py4X0s=; b=WVkdmBC+bvEOJL5otBVtEfjl6tac/Lq1o07w2ZzJs9wBcXv6Yn0Y7ExQQKQ0k/j93WEy0QxbMGgxpEH4YKyWPQBqA5Lvm0OBfSL2I8GhUBpghQajfyRSvhby2g0F6BsbVta9KEOukCrwKZRgV90aqzSzJl+LXKAUDdB3y07RIMY=; Received: from [188.134.40.128] (port=45315 helo=shc.zet) by smtp24.mail.ru with esmtpa (envelope-from ) id 1WCiO1-0000aF-Sv; Mon, 10 Feb 2014 08:22:26 +0400 From: Alexander Shiyan To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Shawn Guo , Sascha Hauer , Samuel Ortiz , Lee Jones , Alexander Shiyan Subject: [PATCH 2/4] input: mc13783: Use module_platform_driver_probe() Date: Mon, 10 Feb 2014 08:22:18 +0400 Message-Id: <1392006138-10341-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.3.2 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Mras: Ok Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RDNS_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Driver should be probed from MC13XXX MFD core only, so change driver declaration to use module_platform_driver_probe(). Signed-off-by: Alexander Shiyan --- drivers/input/misc/mc13783-pwrbutton.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/input/misc/mc13783-pwrbutton.c b/drivers/input/misc/mc13783-pwrbutton.c index 60be67a..a1e45235 100644 --- a/drivers/input/misc/mc13783-pwrbutton.c +++ b/drivers/input/misc/mc13783-pwrbutton.c @@ -88,7 +88,7 @@ static irqreturn_t button_irq(int irq, void *_priv) return IRQ_HANDLED; } -static int mc13783_pwrbutton_probe(struct platform_device *pdev) +static int __init mc13xxx_pwrbutton_probe(struct platform_device *pdev) { const struct mc13xxx_buttons_platform_data *pdata; struct mc13xxx *mc13783 = dev_get_drvdata(pdev->dev.parent); @@ -229,7 +229,7 @@ free_input_dev: return err; } -static int mc13783_pwrbutton_remove(struct platform_device *pdev) +static int mc13xxx_pwrbutton_remove(struct platform_device *pdev) { struct mc13783_pwrb *priv = platform_get_drvdata(pdev); const struct mc13xxx_buttons_platform_data *pdata; @@ -253,18 +253,15 @@ static int mc13783_pwrbutton_remove(struct platform_device *pdev) return 0; } -static struct platform_driver mc13783_pwrbutton_driver = { - .probe = mc13783_pwrbutton_probe, - .remove = mc13783_pwrbutton_remove, +static struct platform_driver mc13xxx_pwrbutton_driver = { .driver = { .name = "mc13783-pwrbutton", .owner = THIS_MODULE, }, + .remove = mc13xxx_pwrbutton_remove, }; +module_platform_driver_probe(mc13xxx_pwrbutton_driver, mc13xxx_pwrbutton_probe); -module_platform_driver(mc13783_pwrbutton_driver); - -MODULE_ALIAS("platform:mc13783-pwrbutton"); MODULE_DESCRIPTION("MC13783 Power Button"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Philippe Retornaz");