aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/ac.c')
-rw-r--r--drivers/acpi/ac.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 831883b7d6c9..9b917dac7732 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -37,7 +37,6 @@
37#include <acpi/acpi_bus.h> 37#include <acpi/acpi_bus.h>
38#include <acpi/acpi_drivers.h> 38#include <acpi/acpi_drivers.h>
39 39
40#define ACPI_AC_COMPONENT 0x00020000
41#define ACPI_AC_CLASS "ac_adapter" 40#define ACPI_AC_CLASS "ac_adapter"
42#define ACPI_AC_DEVICE_NAME "AC Adapter" 41#define ACPI_AC_DEVICE_NAME "AC Adapter"
43#define ACPI_AC_FILE_STATE "state" 42#define ACPI_AC_FILE_STATE "state"
@@ -85,7 +84,7 @@ struct acpi_ac {
85 struct power_supply charger; 84 struct power_supply charger;
86#endif 85#endif
87 struct acpi_device * device; 86 struct acpi_device * device;
88 unsigned long state; 87 unsigned long long state;
89}; 88};
90 89
91#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); 90#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
@@ -242,7 +241,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
242 acpi_ac_get_state(ac); 241 acpi_ac_get_state(ac);
243 acpi_bus_generate_proc_event(device, event, (u32) ac->state); 242 acpi_bus_generate_proc_event(device, event, (u32) ac->state);
244 acpi_bus_generate_netlink_event(device->pnp.device_class, 243 acpi_bus_generate_netlink_event(device->pnp.device_class,
245 device->dev.bus_id, event, 244 dev_name(&device->dev), event,
246 (u32) ac->state); 245 (u32) ac->state);
247#ifdef CONFIG_ACPI_SYSFS_POWER 246#ifdef CONFIG_ACPI_SYSFS_POWER
248 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); 247 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
@@ -269,7 +268,7 @@ static int acpi_ac_add(struct acpi_device *device)
269 ac->device = device; 268 ac->device = device;
270 strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME); 269 strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);
271 strcpy(acpi_device_class(device), ACPI_AC_CLASS); 270 strcpy(acpi_device_class(device), ACPI_AC_CLASS);
272 acpi_driver_data(device) = ac; 271 device->driver_data = ac;
273 272
274 result = acpi_ac_get_state(ac); 273 result = acpi_ac_get_state(ac);
275 if (result) 274 if (result)