Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=479ef4369f65abf4c3e7bbe44ef934a465257ee1
Commit:     479ef4369f65abf4c3e7bbe44ef934a465257ee1
Parent:     9422db4018cbfaa1a330b018a2bf6527d282b417
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 11:54:41 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri May 11 16:56:08 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/drivers/mts64.c      |    4 ++--
 sound/drivers/portman2x4.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c
index 6c9f4c9..ebb1bda 100644
--- a/sound/drivers/mts64.c
+++ b/sound/drivers/mts64.c
@@ -892,13 +892,13 @@ static void __devinit snd_mts64_attach(struct parport *p)
        struct platform_device *device;
 
        device = platform_device_alloc(PLATFORM_DRIVER, device_count);
-       if (!device) 
+       if (!device)
                return;
 
        /* Temporary assignment to forward the parport */
        platform_set_drvdata(device, p);
 
-       if (platform_device_register(device) < 0) {
+       if (platform_device_add(device) < 0) {
                platform_device_put(device);
                return;
        }
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index b2d0ba4..497cafb 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -676,13 +676,13 @@ static void __devinit snd_portman_attach(struct parport 
*p)
        struct platform_device *device;
 
        device = platform_device_alloc(PLATFORM_DRIVER, device_count);
-       if (!device) 
+       if (!device)
                return;
 
        /* Temporary assignment to forward the parport */
        platform_set_drvdata(device, p);
 
-       if (platform_device_register(device) < 0) {
+       if (platform_device_add(device) < 0) {
                platform_device_put(device);
                return;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to