diff options
Diffstat (limited to 'drivers/char/sonypi.c')
-rw-r--r-- | drivers/char/sonypi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index a90f5d97df35..43dfd8689dce 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -512,7 +512,7 @@ static struct sonypi_device { | |||
512 | 512 | ||
513 | #ifdef CONFIG_ACPI | 513 | #ifdef CONFIG_ACPI |
514 | static struct acpi_device *sonypi_acpi_device; | 514 | static struct acpi_device *sonypi_acpi_device; |
515 | static int acpi_enabled; | 515 | static int acpi_driver_registered; |
516 | #endif | 516 | #endif |
517 | 517 | ||
518 | static int sonypi_ec_write(u8 addr, u8 value) | 518 | static int sonypi_ec_write(u8 addr, u8 value) |
@@ -869,7 +869,7 @@ found: | |||
869 | sonypi_report_input_event(event); | 869 | sonypi_report_input_event(event); |
870 | 870 | ||
871 | #ifdef CONFIG_ACPI | 871 | #ifdef CONFIG_ACPI |
872 | if (acpi_enabled) | 872 | if (sonypi_acpi_device) |
873 | acpi_bus_generate_event(sonypi_acpi_device, 1, event); | 873 | acpi_bus_generate_event(sonypi_acpi_device, 1, event); |
874 | #endif | 874 | #endif |
875 | 875 | ||
@@ -1551,8 +1551,8 @@ static int __init sonypi_init(void) | |||
1551 | goto err_free_device; | 1551 | goto err_free_device; |
1552 | 1552 | ||
1553 | #ifdef CONFIG_ACPI | 1553 | #ifdef CONFIG_ACPI |
1554 | if (acpi_bus_register_driver(&sonypi_acpi_driver) > 0) | 1554 | if (acpi_bus_register_driver(&sonypi_acpi_driver) >= 0) |
1555 | acpi_enabled = 1; | 1555 | acpi_driver_registered = 1; |
1556 | #endif | 1556 | #endif |
1557 | 1557 | ||
1558 | return 0; | 1558 | return 0; |
@@ -1567,7 +1567,7 @@ static int __init sonypi_init(void) | |||
1567 | static void __exit sonypi_exit(void) | 1567 | static void __exit sonypi_exit(void) |
1568 | { | 1568 | { |
1569 | #ifdef CONFIG_ACPI | 1569 | #ifdef CONFIG_ACPI |
1570 | if (acpi_enabled) | 1570 | if (acpi_driver_registered) |
1571 | acpi_bus_unregister_driver(&sonypi_acpi_driver); | 1571 | acpi_bus_unregister_driver(&sonypi_acpi_driver); |
1572 | #endif | 1572 | #endif |
1573 | platform_device_unregister(sonypi_platform_device); | 1573 | platform_device_unregister(sonypi_platform_device); |