spi_s3c24xx: fix section mismatch and __devexit code
Subsystems (2)
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.
drivers/spi/spi_s3c24xx.c +5 -5
@@ -387,7 +387,7 @@ static int __init s3c24xx_spi_probe(strureturn 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_spstatic 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);
Signature · 9 lines
Ben ([email protected], 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=/
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Ben Dooks
Fix the section mismatch warning generated by the iconrrect naming of
s3c24xx_spidrvwhich should bes3c24xx_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.
Quoted 2 lines
As noted below, the exit function should be marked
__devexitin 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
Quoted 33 lines
Signed-off-by Ben Dooks <[email protected]>Index:
linux-2.6.27-rc2-quilt1/drivers/spi/spi_s3c24xx.c
===================================================================drivers/spi/spi_s3c24xx.c +3
-4@@ -387,7 +387,7 @@ static int __init s3c24xx_spi_probe(strureturn 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_spstatic int __init s3c24xx_spi_init (void ) { -return platform_driver_probe (&s3c24xx_spidrv, s3c24xx_spi_probe);
drivers/spi/spi_s3c24xx.c static struct platform_driver s3c24xx_sp · line 459
Quoted 10 lines
drivers/spi/spi_s3c24xx.c +2
-1+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=/