Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=015a916fbbf105bb15f4bbfd80c3b9b2f2e0d7db
Commit:     015a916fbbf105bb15f4bbfd80c3b9b2f2e0d7db
Parent:     f46d1604ed84e5a4107bae1db7283e3a76d72ace
Author:     Mattia Dongili <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 12 16:20:27 2007 +0900
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Fri Aug 24 00:57:20 2007 -0400

    sony-laptop: call sonypi_compat_init earlier
    
    sonypi_compat uses a kfifo that needs to be present before _SRS is
    called to be able to cope with the IRQs triggered when setting
    resources.
    
    Signed-off-by: Mattia Dongili <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/misc/sony-laptop.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 7707cc2..7d8bebe 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -2317,8 +2317,6 @@ static int sony_pic_remove(struct acpi_device *device, 
int type)
        struct sony_pic_ioport *io, *tmp_io;
        struct sony_pic_irq *irq, *tmp_irq;
 
-       sonypi_compat_exit();
-
        if (sony_pic_disable(device)) {
                printk(KERN_ERR DRV_PFX "Couldn't disable device.\n");
                return -ENXIO;
@@ -2328,6 +2326,8 @@ static int sony_pic_remove(struct acpi_device *device, 
int type)
        release_region(spic_dev.cur_ioport->io.minimum,
                        spic_dev.cur_ioport->io.address_length);
 
+       sonypi_compat_exit();
+
        sony_laptop_remove_input();
 
        /* pf attrs */
@@ -2393,6 +2393,9 @@ static int sony_pic_add(struct acpi_device *device)
                goto err_free_resources;
        }
 
+       if (sonypi_compat_init())
+               goto err_remove_input;
+
        /* request io port */
        list_for_each_entry(io, &spic_dev.ioports, list) {
                if (request_region(io->io.minimum, io->io.address_length,
@@ -2407,7 +2410,7 @@ static int sony_pic_add(struct acpi_device *device)
        if (!spic_dev.cur_ioport) {
                printk(KERN_ERR DRV_PFX "Failed to request_region.\n");
                result = -ENODEV;
-               goto err_remove_input;
+               goto err_remove_compat;
        }
 
        /* request IRQ */
@@ -2447,9 +2450,6 @@ static int sony_pic_add(struct acpi_device *device)
        if (result)
                goto err_remove_pf;
 
-       if (sonypi_compat_init())
-               goto err_remove_pf;
-
        return 0;
 
 err_remove_pf:
@@ -2465,6 +2465,9 @@ err_release_region:
        release_region(spic_dev.cur_ioport->io.minimum,
                        spic_dev.cur_ioport->io.address_length);
 
+err_remove_compat:
+       sonypi_compat_exit();
+
 err_remove_input:
        sony_laptop_remove_input();
 
-
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