From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756921Ab3BYG7m (ORCPT ); Mon, 25 Feb 2013 01:59:42 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:36533 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178Ab3BYG7l (ORCPT ); Mon, 25 Feb 2013 01:59:41 -0500 From: Dmitry Torokhov To: linux-kernel@vger.kernel.org Cc: Evgeniy Polyakov , Greg Kroah-Hartman , Ville Syrjala , Daniel Mack , Matt Ranostay , panto@antoniou-consulting.com, koen@dominion.thruhere.net Subject: [PATCH v2 1/5] W1: w1-gpio - fix incorrect __init/__exit markups Date: Sun, 24 Feb 2013 22:59:33 -0800 Message-Id: <1361775577-4578-1-git-send-email-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1361606320-4479-1-git-send-email-dmitry.torokhov@gmail.com> References: <1361606320-4479-1-git-send-email-dmitry.torokhov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should not be using __init/__exit markups on probe() and remove() methods unless platform_device_probe() is used, because other methods allow unbinding device through sysfs and these methods should not be discarded. Signed-off-by: Dmitry Torokhov --- Paatch #4 was adjusted according to Ville's comments. drivers/w1/masters/w1-gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 85b363a..799dafd 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -72,7 +72,7 @@ static int w1_gpio_probe_dt(struct platform_device *pdev) return 0; } -static int __init w1_gpio_probe(struct platform_device *pdev) +static int w1_gpio_probe(struct platform_device *pdev) { struct w1_bus_master *master; struct w1_gpio_platform_data *pdata; @@ -158,7 +158,7 @@ static int __init w1_gpio_probe(struct platform_device *pdev) return err; } -static int __exit w1_gpio_remove(struct platform_device *pdev) +static int w1_gpio_remove(struct platform_device *pdev) { struct w1_bus_master *master = platform_get_drvdata(pdev); struct w1_gpio_platform_data *pdata = pdev->dev.platform_data; @@ -210,7 +210,7 @@ static struct platform_driver w1_gpio_driver = { .of_match_table = of_match_ptr(w1_gpio_dt_ids), }, .probe = w1_gpio_probe, - .remove = __exit_p(w1_gpio_remove), + .remove = w1_gpio_remove, .suspend = w1_gpio_suspend, .resume = w1_gpio_resume, }; -- 1.7.11.7