From 418c8f89911dd3d4930221def3bd56b38b051789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Sun, 14 Sep 2008 21:32:33 +0200 Subject: ALSA: Fix section for snd-aica platform driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't use __init but __devinit to define probe function. A pointer to snd_aica_probe is passed to the core via platform_driver_register and so the function must not disappear after the module is loaded. Using __init and having HOTPLUG=y and SND_AICA=m the following probably oopses: echo -n AICA > /sys/bus/platform/driver/AICA/unbind echo -n AICA > /sys/bus/platform/driver/AICA/bind Strange enough add_aicamixer_controls which is only called by snd_aica_probe was already using __devinit. While at it move the remove function to .devexit.text section. Signed-off-by: Uwe Kleine-König Cc: Adrian McMenamin Cc: Paul Mundt Cc: Jaroslav Kysela Cc: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/sh/aica.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/sh') diff --git a/sound/sh/aica.c b/sound/sh/aica.c index 55031d0a6558..7c920f3e7fe3 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -590,7 +590,7 @@ static int __devinit add_aicamixer_controls(struct snd_card_aica return 0; } -static int snd_aica_remove(struct platform_device *devptr) +static int __devexit snd_aica_remove(struct platform_device *devptr) { struct snd_card_aica *dreamcastcard; dreamcastcard = platform_get_drvdata(devptr); @@ -602,7 +602,7 @@ static int snd_aica_remove(struct platform_device *devptr) return 0; } -static int __init snd_aica_probe(struct platform_device *devptr) +static int __devinit snd_aica_probe(struct platform_device *devptr) { int err; struct snd_card_aica *dreamcastcard; @@ -651,7 +651,7 @@ static int __init snd_aica_probe(struct platform_device *devptr) static struct platform_driver snd_aica_driver = { .probe = snd_aica_probe, - .remove = snd_aica_remove, + .remove = __devexit_p(snd_aica_remove), .driver = { .name = SND_AICA_DRIVER}, }; -- cgit v1.2.3