]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/acpiphp_ibm.c
Pull events into release branch
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / acpiphp_ibm.c
index 7f03881a8b682aa958f4919fa570fecfc1674c60..56829f82be4a1f34fa5c0fd11a75f99220debc27 100644 (file)
@@ -106,7 +106,8 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status);
 static void ibm_handle_events(acpi_handle handle, u32 event, void *context);
 static int ibm_get_table_from_acpi(char **bufp);
 static ssize_t ibm_read_apci_table(struct kobject *kobj,
-               char *buffer, loff_t pos, size_t size);
+                                  struct bin_attribute *bin_attr,
+                                  char *buffer, loff_t pos, size_t size);
 static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
                u32 lvl, void *context, void **rv);
 static int __init ibm_acpiphp_init(void);
@@ -117,7 +118,6 @@ static struct notification ibm_note;
 static struct bin_attribute ibm_apci_table_attr = {
            .attr = {
                    .name = "apci_table",
-                   .owner = THIS_MODULE,
                    .mode = S_IRUGO,
            },
            .read = ibm_read_apci_table,
@@ -267,7 +267,10 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
 
        if (subevent == 0x80) {
                dbg("%s: generationg bus event\n", __FUNCTION__);
-               acpi_bus_generate_event(note->device, note->event, detail);
+               acpi_bus_generate_proc_event(note->device, note->event, detail);
+               acpi_bus_generate_netlink_event(note->device->pnp.device_class,
+                                                 note->device->dev.bus_id,
+                                                 note->event, detail);
        } else
                note->event = event;
 }
@@ -358,7 +361,8 @@ read_table_done:
  * our solution is to only allow reading the table in all at once
  **/
 static ssize_t ibm_read_apci_table(struct kobject *kobj,
-               char *buffer, loff_t pos, size_t size)
+                                  struct bin_attribute *bin_attr,
+                                  char *buffer, loff_t pos, size_t size)
 {
        int bytes_read = -EINVAL;
        char *table = NULL;
@@ -398,7 +402,7 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
 
        status = acpi_get_object_info(handle, &info_buffer);
        if (ACPI_FAILURE(status)) {
-               err("%s:  Failed to get device information", __FUNCTION__);
+               err("%s:  Failed to get device information\n", __FUNCTION__);
                return 0;
        }
        info.hardware_id.value[sizeof(info.hardware_id.value) - 1] = '\0';
@@ -424,7 +428,7 @@ static int __init ibm_acpiphp_init(void)
        int retval = 0;
        acpi_status status;
        struct acpi_device *device;
-       struct kobject *sysdir = &pci_hotplug_slots_subsys.kset.kobj;
+       struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj;
 
        dbg("%s\n", __FUNCTION__);
 
@@ -471,7 +475,7 @@ init_return:
 static void __exit ibm_acpiphp_exit(void)
 {
        acpi_status status;
-       struct kobject *sysdir = &pci_hotplug_slots_subsys.kset.kobj;
+       struct kobject *sysdir = &pci_hotplug_slots_subsys.kobj;
 
        dbg("%s\n", __FUNCTION__);