Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29137
b: refs/heads/master
c: e4513a5
h: refs/heads/master
i:
  29135: 78a4ed3
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Apr 2, 2006
1 parent 0a4e171 commit 8650c26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 578b333bfe8eb1360207a08a53c321822a8f40f3
refs/heads/master: e4513a57ef719d3d6d1cee0ca4d9f4016aa452bb
10 changes: 5 additions & 5 deletions trunk/drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static struct sonypi_device {

#ifdef CONFIG_ACPI
static struct acpi_device *sonypi_acpi_device;
static int acpi_enabled;
static int acpi_driver_registered;
#endif

static int sonypi_ec_write(u8 addr, u8 value)
Expand Down Expand Up @@ -869,7 +869,7 @@ static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs)
sonypi_report_input_event(event);

#ifdef CONFIG_ACPI
if (acpi_enabled)
if (sonypi_acpi_device)
acpi_bus_generate_event(sonypi_acpi_device, 1, event);
#endif

Expand Down Expand Up @@ -1548,8 +1548,8 @@ static int __init sonypi_init(void)
goto err_free_device;

#ifdef CONFIG_ACPI
if (acpi_bus_register_driver(&sonypi_acpi_driver) > 0)
acpi_enabled = 1;
if (acpi_bus_register_driver(&sonypi_acpi_driver) >= 0)
acpi_driver_registered = 1;
#endif

return 0;
Expand All @@ -1564,7 +1564,7 @@ static int __init sonypi_init(void)
static void __exit sonypi_exit(void)
{
#ifdef CONFIG_ACPI
if (acpi_enabled)
if (acpi_driver_registered)
acpi_bus_unregister_driver(&sonypi_acpi_driver);
#endif
platform_device_unregister(sonypi_platform_device);
Expand Down

0 comments on commit 8650c26

Please sign in to comment.