From patchwork Wed Jun 5 08:34:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2673101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 4FAEBDF264 for ; Wed, 5 Jun 2013 18:34:24 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uk9Nx-0006a5-2a; Wed, 05 Jun 2013 08:48:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uk9JS-0003Gp-TC; Wed, 05 Jun 2013 08:43:22 +0000 Received: from smtp8.mail.ru ([94.100.176.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uk9BZ-0002CK-G3 for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2013 08:35:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=uH2f5fYoe/X/6ljefKPOn+3Z9rzy/CAqXcXgqA0OZ3A=; b=B4d2o0OmXPHvQIZ7l0gSl6dK/DXqwMrYEY6J/2VuZ1DTj8RjMBDrUSaVpLu23Ha344yy4lmhioW7vvTso1TqhKf+v73VV+X7cHuzyT+wIErMmHz/uhzcGMXl4tjsjZSCAElOnAEIn7Yebcl2aHP8HaVkQy+IQb5nkK2MD//dcHU=; Received: from [188.134.40.128] (port=26760 helo=shc.zet) by smtp8.mail.ru with esmtpa (envelope-from ) id 1Uk9BD-0000y8-Um; Wed, 05 Jun 2013 12:34:52 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/4] leds: leds-mc13xxx: Use module_platform_driver_probe for driver Date: Wed, 5 Jun 2013 12:34:39 +0400 Message-Id: <1370421279-23348-5-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1370421279-23348-1-git-send-email-shc_work@mail.ru> References: <1370421279-23348-1-git-send-email-shc_work@mail.ru> X-Spam: Not detected X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130605_043514_445045_B8E93BD0 X-CRM114-Status: GOOD ( 12.16 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [94.100.176.53 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shc_work[at]mail.ru) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Russell King , Alexander Shiyan , Arnd Bergmann , Bryan Wu , Richard Purdie , Sascha Hauer , Olof Johansson , Shawn Guo , linux-leds@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org MC13XXX LEDs is a part of MC13XXX MFD and driver loaded from parent MFD driver, so replace module_platform_driver with module_platform_driver_probe. Signed-off-by: Alexander Shiyan --- drivers/leds/leds-mc13xxx.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/leds/leds-mc13xxx.c b/drivers/leds/leds-mc13xxx.c index 53d7afd..3b64cc9 100644 --- a/drivers/leds/leds-mc13xxx.c +++ b/drivers/leds/leds-mc13xxx.c @@ -175,7 +175,7 @@ static void mc13xxx_led_set(struct led_classdev *led_cdev, schedule_work(&led->work); } -static int mc13xxx_led_setup(struct mc13xxx_led *led, int max_current) +static int __init mc13xxx_led_setup(struct mc13xxx_led *led, int max_current) { int shift, mask, reg, ret, bank; @@ -244,7 +244,7 @@ static int mc13xxx_led_setup(struct mc13xxx_led *led, int max_current) return ret; } -static int mc13783_leds_startup(struct platform_device *pdev) +static int __init mc13783_leds_startup(struct platform_device *pdev) { struct mc13xxx_leds_platform_data *pdata = dev_get_platdata(&pdev->dev); struct mc13xxx *dev = dev_get_drvdata(pdev->dev.parent); @@ -341,7 +341,7 @@ static void mc13783_leds_shutdown(struct platform_device *pdev) mc13xxx_unlock(dev); } -static int mc13892_leds_startup(struct platform_device *pdev) +static int __init mc13892_leds_startup(struct platform_device *pdev) { struct mc13xxx_leds_platform_data *pdata = dev_get_platdata(&pdev->dev); struct mc13xxx *dev = dev_get_drvdata(pdev->dev.parent); @@ -401,7 +401,7 @@ static void mc13892_leds_shutdown(struct platform_device *pdev) mc13xxx_unlock(dev); } -static int mc13xxx_led_probe(struct platform_device *pdev) +static int __init mc13xxx_led_probe(struct platform_device *pdev) { struct mc13xxx_leds_platform_data *pdata = dev_get_platdata(&pdev->dev); struct mc13xxx_led_devtype *devtype = @@ -535,11 +535,10 @@ static struct platform_driver mc13xxx_led_driver = { .name = "mc13xxx-led", .owner = THIS_MODULE, }, - .probe = mc13xxx_led_probe, .remove = mc13xxx_led_remove, .id_table = mc13xxx_led_id_table, }; -module_platform_driver(mc13xxx_led_driver); +module_platform_driver_probe(mc13xxx_led_driver, mc13xxx_led_probe); MODULE_DESCRIPTION("LEDs driver for Freescale MC13XXX PMIC"); MODULE_AUTHOR("Philippe Retornaz ");