Pull events into release branch
[sfrench/cifs-2.6.git] / drivers / acpi / battery.c
index cad932de383d02c3f3426f3784a9ff2190a1e4b2..9b2c0f74f869a6c4ce74e64462432c24ebf770b0 100644 (file)
@@ -41,7 +41,6 @@
 
 #define ACPI_BATTERY_COMPONENT         0x00040000
 #define ACPI_BATTERY_CLASS             "battery"
-#define ACPI_BATTERY_HID               "PNP0C0A"
 #define ACPI_BATTERY_DEVICE_NAME       "Battery"
 #define ACPI_BATTERY_NOTIFY_STATUS     0x80
 #define ACPI_BATTERY_NOTIFY_INFO       0x81
@@ -74,10 +73,16 @@ static int acpi_battery_add(struct acpi_device *device);
 static int acpi_battery_remove(struct acpi_device *device, int type);
 static int acpi_battery_resume(struct acpi_device *device);
 
+static const struct acpi_device_id battery_device_ids[] = {
+       {"PNP0C0A", 0},
+       {"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, battery_device_ids);
+
 static struct acpi_driver acpi_battery_driver = {
        .name = "battery",
        .class = ACPI_BATTERY_CLASS,
-       .ids = ACPI_BATTERY_HID,
+       .ids = battery_device_ids,
        .ops = {
                .add = acpi_battery_add,
                .resume = acpi_battery_resume,
@@ -867,8 +872,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
        case ACPI_NOTIFY_DEVICE_CHECK:
                device = battery->device;
                acpi_battery_notify_update(battery);
-               acpi_bus_generate_event(device, event,
+               acpi_bus_generate_proc_event(device, event,
                                        acpi_battery_present(battery));
+               acpi_bus_generate_netlink_event(device->pnp.device_class,
+                                                 device->dev.bus_id, event,
+                                                 acpi_battery_present(battery));
                break;
        default:
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,