• Uwe Kleine-König's avatar
    Fix sections for omap-mcbsp platform driver · 0808a402
    Uwe Kleine-König authored
    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: default avatarUwe Kleine-König <ukleinek@strlen.de>
    Cc: Russell King <rmk+kernel@arm.linux.org.uk>
    Cc: Tony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    0808a402
mcbsp.c 24.4 KB