aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/mts64.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-04-23 05:54:41 -0400
committerJaroslav Kysela <perex@suse.cz>2007-05-11 10:56:08 -0400
commit479ef4369f65abf4c3e7bbe44ef934a465257ee1 (patch)
tree1ac2fe99d0e40178253002a8decfab6b5a70b924 /sound/drivers/mts64.c
parent9422db4018cbfaa1a330b018a2bf6527d282b417 (diff)
[ALSA] sound: fix incorrect use of platform_device_register()
The platform_device allocated by platform_device_alloc() should be added to the device hierarchy by platform_device_add() instead of platform_device_register(). Otherwise it will hit WARN_ON() in platform_device_register(). by illegal refcount. This patch fixes such incorrect usages in portman2x4 and mts64 drivers. Also it removes unnecessary trailing whitespaces. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/drivers/mts64.c')
-rw-r--r--sound/drivers/mts64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
index 6c9f4c9bfeb6..ebb1bdac7237 100644
--- a/sound/drivers/mts64.c
+++ b/sound/drivers/mts64.c
@@ -892,13 +892,13 @@ static void __devinit snd_mts64_attach(struct parport *p)
892 struct platform_device *device; 892 struct platform_device *device;
893 893
894 device = platform_device_alloc(PLATFORM_DRIVER, device_count); 894 device = platform_device_alloc(PLATFORM_DRIVER, device_count);
895 if (!device) 895 if (!device)
896 return; 896 return;
897 897
898 /* Temporary assignment to forward the parport */ 898 /* Temporary assignment to forward the parport */
899 platform_set_drvdata(device, p); 899 platform_set_drvdata(device, p);
900 900
901 if (platform_device_register(device) < 0) { 901 if (platform_device_add(device) < 0) {
902 platform_device_put(device); 902 platform_device_put(device);
903 return; 903 return;
904 } 904 }