Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbZJOFXg (ORCPT ); Thu, 15 Oct 2009 01:23:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751898AbZJOFXf (ORCPT ); Thu, 15 Oct 2009 01:23:35 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:33071 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbZJOFXf (ORCPT ); Thu, 15 Oct 2009 01:23:35 -0400 From: Mike Frysinger To: David Brownell , Andrew Morton Cc: linux-kernel@vger.kernel.org Subject: [PATCH] twl4030-gpio: drop __devexit markings from remove func Date: Thu, 15 Oct 2009 01:22:56 -0400 Message-Id: <1255584176-3457-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1883 Lines: 50 The gpio_twl4030_probe() function calls gpio_twl4030_remove(), and the former has __devinit, so the latter cannot use __devexit. Otherwise we hit the section mismatch warning: WARNING: drivers/gpio/built-in.o(.devinit.text+0x71a): Section mismatch in reference from the function _gpio_twl4030_probe() to the function .devexit.text:_gpio_twl4030_remove() The function __devinit _gpio_twl4030_probe() references a function __devexit _gpio_twl4030_remove(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of _gpio_twl4030_remove() so it may be used outside an exit section. Signed-off-by: Mike Frysinger --- drivers/gpio/twl4030-gpio.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/twl4030-gpio.c b/drivers/gpio/twl4030-gpio.c index afad147..49384a7 100644 --- a/drivers/gpio/twl4030-gpio.c +++ b/drivers/gpio/twl4030-gpio.c @@ -460,7 +460,8 @@ no_irqs: return ret; } -static int __devexit gpio_twl4030_remove(struct platform_device *pdev) +/* Cannot use __devexit as gpio_twl4030_probe() calls us */ +static int gpio_twl4030_remove(struct platform_device *pdev) { struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data; int status; @@ -493,7 +494,7 @@ static struct platform_driver gpio_twl4030_driver = { .driver.name = "twl4030_gpio", .driver.owner = THIS_MODULE, .probe = gpio_twl4030_probe, - .remove = __devexit_p(gpio_twl4030_remove), + .remove = gpio_twl4030_remove, }; static int __init gpio_twl4030_init(void) -- 1.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/