From: David Brownell Subject: Re: spi_s3c24xx: fix section mismatch and __devexit code Date: Thu, 11 Sep 2008 10:50:58 -0700 Message-ID: <200809111050.58298.david-b@pacbell.net> References: <20080808100250.288677484@fluff.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Ben Dooks Return-path: In-Reply-To: <20080808100250.288677484-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org> Content-Disposition: inline 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 On Friday 08 August 2008, Ben Dooks wrote: > 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) Right ... I dislike such rude reactions to not following a naming convention, but that's what we're stuck with. > As noted below, the exit function should be marked __devexit > in case the platform device is capable of being removed. But these devices aren't capable of hotplugging ... and if they were, it would be inappropriate to use the more memory-efficient platform_driver_probe() call. Any objection if I just take this __devexit bit out and then send the patch along? - dave > 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); > > ------------------------------------------------------------------------- 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=/