aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mcbsp.c
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@strlen.de>2008-10-08 03:01:39 -0400
committerTony Lindgren <tony@atomide.com>2008-10-08 03:01:39 -0400
commit25cef2251415cef5438e20965fec87096fe2efb0 (patch)
tree8f3de286d8c8d4a57f2cc04b036bd3f3680bb026 /arch/arm/plat-omap/mcbsp.c
parent56f68556d7bbb51dd158c74deb09c783345bfbbd (diff)
Fix sections for omap-mcbsp platform driver
Don't use __init but __devinit to define probe function. A pointer to omap_mcbsp_probe is passed to the core via platform_driver_register and so the function must not disappear when the init code is freed. Using __init and having HOTPLUG=y the following probably oopses: echo -n omap-mcbsp.1 > /sys/bus/platform/driver/omap-mcbsp/unbind echo -n omap-mcbsp.1 > /sys/bus/platform/driver/omap-mcbsp/bind While at it move the remove function to the .devexit.text section. Signed-off-by: Uwe Kleine-König <ukleinek@strlen.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/mcbsp.c')
-rw-r--r--arch/arm/plat-omap/mcbsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index e63990fd923..e0803a8344b 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -804,7 +804,7 @@ EXPORT_SYMBOL(omap_mcbsp_set_spi_mode);
804 * McBSP1 and McBSP3 are directly mapped on 1610 and 1510. 804 * McBSP1 and McBSP3 are directly mapped on 1610 and 1510.
805 * 730 has only 2 McBSP, and both of them are MPU peripherals. 805 * 730 has only 2 McBSP, and both of them are MPU peripherals.
806 */ 806 */
807static int __init omap_mcbsp_probe(struct platform_device *pdev) 807static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
808{ 808{
809 struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data; 809 struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data;
810 int id = pdev->id - 1; 810 int id = pdev->id - 1;
@@ -868,7 +868,7 @@ exit:
868 return ret; 868 return ret;
869} 869}
870 870
871static int omap_mcbsp_remove(struct platform_device *pdev) 871static int __devexit omap_mcbsp_remove(struct platform_device *pdev)
872{ 872{
873 struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); 873 struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
874 874
@@ -894,7 +894,7 @@ static int omap_mcbsp_remove(struct platform_device *pdev)
894 894
895static struct platform_driver omap_mcbsp_driver = { 895static struct platform_driver omap_mcbsp_driver = {
896 .probe = omap_mcbsp_probe, 896 .probe = omap_mcbsp_probe,
897 .remove = omap_mcbsp_remove, 897 .remove = __devexit_p(omap_mcbsp_remove),
898 .driver = { 898 .driver = {
899 .name = "omap-mcbsp", 899 .name = "omap-mcbsp",
900 }, 900 },