From: Ben Dooks Subject: spi_s3c24xx: fix section mismatch and __devexit code Date: Fri, 08 Aug 2008 11:02:51 +0100 Message-ID: <20080808100250.288677484@fluff.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Ben Dooks To: david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: Content-Disposition: inline; filename=simtec/simtec-s3c24xx-spi-section-mismatch.patch List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org Fix the section mismatch warning generated by the iconrrect naming of s3c24xx_spidrv which should be s3c24xx_spi_driver: WARNING: drivers/spi/spi_s3c24xx.o(.data+0x4): Section mismatch in reference from the variable s3c24xx_spidrv to the (unknown reference) .exit.text:(unknown) As noted below, the exit function should be marked __devexit in case the platform device is capable of being removed. Signed-off-by: Ben Dooks Index: linux-2.6.27-rc2-quilt1/drivers/spi/spi_s3c24xx.c =================================================================== --- linux-2.6.27-rc2-quilt1.orig/drivers/spi/spi_s3c24xx.c 2008-08-07 12:37:43.000000000 +0100 +++ linux-2.6.27-rc2-quilt1/drivers/spi/spi_s3c24xx.c 2008-08-07 12:40:12.000000000 +0100 @@ -387,7 +387,7 @@ static int __init s3c24xx_spi_probe(stru return err; } -static int __exit s3c24xx_spi_remove(struct platform_device *dev) +static int __devexit s3c24xx_spi_remove(struct platform_device *dev) { struct s3c24xx_spi *hw = platform_get_drvdata(dev); @@ -436,8 +436,8 @@ static int s3c24xx_spi_resume(struct pla #endif MODULE_ALIAS("platform:s3c2410-spi"); -static struct platform_driver s3c24xx_spidrv = { - .remove = __exit_p(s3c24xx_spi_remove), +static struct platform_driver s3c24xx_spi_driver = { + .remove = __devexit_p(s3c24xx_spi_remove), .suspend = s3c24xx_spi_suspend, .resume = s3c24xx_spi_resume, .driver = { @@ -448,12 +448,12 @@ static struct platform_driver s3c24xx_sp static int __init s3c24xx_spi_init(void) { - return platform_driver_probe(&s3c24xx_spidrv, s3c24xx_spi_probe); + return platform_driver_probe(&s3c24xx_spi_driver, s3c24xx_spi_probe); } static void __exit s3c24xx_spi_exit(void) { - platform_driver_unregister(&s3c24xx_spidrv); + platform_driver_unregister(&s3c24xx_spi_driver); } module_init(s3c24xx_spi_init); -- Ben (ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, http://www.fluff.org/) 'a smiley only costs 4 bytes' ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/