Pull events into release branch
authorLen Brown <len.brown@intel.com>
Sat, 25 Aug 2007 05:44:01 +0000 (01:44 -0400)
committerLen Brown <len.brown@intel.com>
Sat, 25 Aug 2007 05:44:01 +0000 (01:44 -0400)
Conflicts:

drivers/acpi/video.c

Signed-off-by: Len Brown <len.brown@intel.com>
1  2 
drivers/acpi/battery.c
drivers/acpi/thermal.c
drivers/acpi/video.c
drivers/misc/asus-laptop.c
drivers/misc/sony-laptop.c
drivers/pci/hotplug/acpiphp_ibm.c

diff --combined drivers/acpi/battery.c
@@@ -113,7 -113,7 +113,7 @@@ struct acpi_battery_info 
        acpi_string oem_info;
  };
  
 -enum acpi_battery_files {
 +enum acpi_battery_files{
        ACPI_BATTERY_INFO = 0,
        ACPI_BATTERY_STATE,
        ACPI_BATTERY_ALARM,
@@@ -129,13 -129,14 +129,13 @@@ struct acpi_battery_flags 
  };
  
  struct acpi_battery {
 +      struct mutex mutex;
        struct acpi_device *device;
        struct acpi_battery_flags flags;
        struct acpi_buffer bif_data;
        struct acpi_buffer bst_data;
 -      struct mutex lock;
        unsigned long alarm;
        unsigned long update_time[ACPI_BATTERY_NUMFILES];
 -
  };
  
  inline int acpi_battery_present(struct acpi_battery *battery)
@@@ -235,10 -236,10 +235,10 @@@ static int acpi_battery_get_info(struc
                return 0;
  
        /* Evaluate _BIF */
 -      mutex_lock(&battery->lock);
 -      status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF",
 -                                    NULL, &buffer);
 -      mutex_unlock(&battery->lock);
 +
 +      status =
 +          acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL,
 +                               &buffer);
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
                return -ENODEV;
@@@ -285,10 -286,10 +285,10 @@@ static int acpi_battery_get_state(struc
                return 0;
  
        /* Evaluate _BST */
 -      mutex_lock(&battery->lock);
 -      status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST",
 -                                    NULL, &buffer);
 -      mutex_unlock(&battery->lock);
 +
 +      status =
 +          acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL,
 +                               &buffer);
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
                return -ENODEV;
@@@ -336,9 -337,10 +336,9 @@@ static int acpi_battery_set_alarm(struc
  
        arg0.integer.value = alarm;
  
 -      mutex_lock(&battery->lock);
 -      status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
 +      status =
 +          acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
                                 &arg_list, NULL);
 -      mutex_unlock(&battery->lock);
        if (ACPI_FAILURE(status))
                return -ENODEV;
  
@@@ -658,8 -660,6 +658,8 @@@ acpi_battery_write_alarm(struct file *f
        if (!battery || (count > sizeof(alarm_string) - 1))
                return -EINVAL;
  
 +      mutex_lock(&battery->mutex);
 +
        result = acpi_battery_update(battery, 1, &update_result);
        if (result) {
                result = -ENODEV;
        acpi_battery_check_result(battery, result);
  
        if (!result)
 -              return count;
 +              result = count;
 +
 +      mutex_unlock(&battery->mutex);
  
        return result;
  }
@@@ -714,8 -712,6 +714,8 @@@ static int acpi_battery_read(int fid, s
        int update_result = ACPI_BATTERY_NONE_UPDATE;
        int update = 0;
  
 +      mutex_lock(&battery->mutex);
 +
        update = (get_seconds() - battery->update_time[fid] >= update_time);
        update = (update | battery->flags.update[fid]);
  
        result = acpi_read_funcs[fid].print(seq, result);
        acpi_battery_check_result(battery, result);
        battery->flags.update[fid] = result;
 +      mutex_unlock(&battery->mutex);
        return result;
  }
  
@@@ -872,8 -867,11 +872,11 @@@ static void acpi_battery_notify(acpi_ha
        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,
@@@ -897,10 -895,7 +900,10 @@@ static int acpi_battery_add(struct acpi
        if (!battery)
                return -ENOMEM;
  
 -      mutex_init(&battery->lock);
 +      mutex_init(&battery->mutex);
 +
 +      mutex_lock(&battery->mutex);
 +
        battery->device = device;
        strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME);
        strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS);
                kfree(battery);
        }
  
 +      mutex_unlock(&battery->mutex);
  
        return result;
  }
@@@ -951,8 -945,6 +954,8 @@@ static int acpi_battery_remove(struct a
  
        battery = acpi_driver_data(device);
  
 +      mutex_lock(&battery->mutex);
 +
        status = acpi_remove_notify_handler(device->handle,
                                            ACPI_ALL_NOTIFY,
                                            acpi_battery_notify);
  
        kfree(battery->bst_data.pointer);
  
 -      mutex_destroy(&battery->lock);
 +      mutex_unlock(&battery->mutex);
 +
 +      mutex_destroy(&battery->mutex);
  
        kfree(battery);
  
diff --combined drivers/acpi/thermal.c
@@@ -77,27 -77,23 +77,27 @@@ MODULE_LICENSE("GPL")
  
  static int act;
  module_param(act, int, 0644);
 -MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");
 +MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.");
 +
 +static int crt;
 +module_param(crt, int, 0644);
 +MODULE_PARM_DESC(crt, "Disable or lower all critical trip points.");
  
  static int tzp;
  module_param(tzp, int, 0444);
 -MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
 +MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.");
  
  static int nocrt;
  module_param(nocrt, int, 0);
 -MODULE_PARM_DESC(nocrt, "Set to disable action on ACPI thermal zone critical and hot trips.\n");
 +MODULE_PARM_DESC(nocrt, "Set to take no action upon ACPI thermal zone critical trips points.");
  
  static int off;
  module_param(off, int, 0);
 -MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n");
 +MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.");
  
  static int psv;
  module_param(psv, int, 0644);
 -MODULE_PARM_DESC(psv, "Disable or override all passive trip points.\n");
 +MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
  
  static int acpi_thermal_add(struct acpi_device *device);
  static int acpi_thermal_remove(struct acpi_device *device, int type);
@@@ -344,20 -340,6 +344,20 @@@ static int acpi_thermal_get_trip_points
                                  tz->trips.critical.temperature));
        }
  
 +      if (tz->trips.critical.flags.valid == 1) {
 +              if (crt == -1) {
 +                      tz->trips.critical.flags.valid = 0;
 +              } else if (crt > 0) {
 +                      unsigned long crt_k = CELSIUS_TO_KELVIN(crt);
 +
 +                      /*
 +                       * Allow override to lower critical threshold
 +                       */
 +                      if (crt_k < tz->trips.critical.temperature)
 +                              tz->trips.critical.temperature = crt_k;
 +              }
 +      }
 +
        /* Critical Sleep (optional) */
  
        status =
@@@ -503,8 -485,12 +503,12 @@@ static int acpi_thermal_critical(struc
        printk(KERN_EMERG
               "Critical temperature reached (%ld C), shutting down.\n",
               KELVIN_TO_CELSIUS(tz->temperature));
-       acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
+       acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
                                tz->trips.critical.flags.enabled);
+       acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
+                                         tz->device->dev.bus_id,
+                                         ACPI_THERMAL_NOTIFY_CRITICAL,
+                                         tz->trips.critical.flags.enabled);
  
        orderly_poweroff(true);
  
@@@ -522,8 -508,12 +526,12 @@@ static int acpi_thermal_hot(struct acpi
        } else if (tz->trips.hot.flags.enabled)
                tz->trips.hot.flags.enabled = 0;
  
-       acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
+       acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT,
                                tz->trips.hot.flags.enabled);
+       acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
+                                         tz->device->dev.bus_id,
+                                         ACPI_THERMAL_NOTIFY_HOT,
+                                         tz->trips.hot.flags.enabled);
  
        /* TBD: Call user-mode "sleep(S4)" function */
  
@@@ -1085,9 -1075,9 +1093,9 @@@ static int acpi_thermal_add_fs(struct a
                entry->owner = THIS_MODULE;
        }
  
 -      /* 'trip_points' [R/W] */
 +      /* 'trip_points' [R] */
        entry = create_proc_entry(ACPI_THERMAL_FILE_TRIP_POINTS,
 -                                S_IFREG | S_IRUGO | S_IWUSR,
 +                                S_IRUGO,
                                  acpi_device_dir(device));
        if (!entry)
                return -ENODEV;
@@@ -1167,12 -1157,16 +1175,16 @@@ static void acpi_thermal_notify(acpi_ha
        case ACPI_THERMAL_NOTIFY_THRESHOLDS:
                acpi_thermal_get_trip_points(tz);
                acpi_thermal_check(tz);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
+               acpi_bus_generate_netlink_event(device->pnp.device_class,
+                                                 device->dev.bus_id, event, 0);
                break;
        case ACPI_THERMAL_NOTIFY_DEVICES:
                if (tz->flags.devices)
                        acpi_thermal_get_devices(tz);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
+               acpi_bus_generate_netlink_event(device->pnp.device_class,
+                                                 device->dev.bus_id, event, 0);
                break;
        default:
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@@ -1357,13 -1351,6 +1369,13 @@@ static int thermal_act(struct dmi_syste
        }
        return 0;
  }
 +static int thermal_nocrt(struct dmi_system_id *d) {
 +
 +      printk(KERN_NOTICE "ACPI: %s detected: "
 +              "disabling all critical thermal trip point actions.\n", d->ident);
 +      nocrt = 1;
 +      return 0;
 +}
  static int thermal_tzp(struct dmi_system_id *d) {
  
        if (tzp == 0) {
@@@ -1412,14 -1399,6 +1424,14 @@@ static struct dmi_system_id thermal_dmi
                DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
                },
        },
 +      {
 +       .callback = thermal_nocrt,
 +       .ident = "Gigabyte GA-7ZX",
 +       .matches = {
 +              DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
 +              DMI_MATCH(DMI_BOARD_NAME, "7ZX"),
 +              },
 +      },
        {}
  };
  #endif /* CONFIG_DMI */
diff --combined drivers/acpi/video.c
@@@ -31,7 -31,7 +31,7 @@@
  #include <linux/list.h>
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
 -
 +#include <linux/input.h>
  #include <linux/backlight.h>
  #include <linux/video_output.h>
  #include <asm/uaccess.h>
@@@ -138,8 -138,6 +138,8 @@@ struct acpi_video_bus 
        struct semaphore sem;
        struct list_head video_device_list;
        struct proc_dir_entry *dir;
 +      struct input_dev *input;
 +      char phys[32];  /* for input device */
  };
  
  struct acpi_video_device_flags {
@@@ -1766,9 -1764,6 +1766,9 @@@ static void acpi_video_bus_notify(acpi_
  {
        struct acpi_video_bus *video = data;
        struct acpi_device *device = NULL;
 +      struct input_dev *input;
 +      int keycode;
 +
  
        printk("video bus notify\n");
  
                return;
  
        device = video->device;
 +      input = video->input;
  
        switch (event) {
        case ACPI_VIDEO_NOTIFY_SWITCH:  /* User requested a switch,
                                         * most likely via hotkey. */
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_SWITCHVIDEOMODE;
                break;
  
        case ACPI_VIDEO_NOTIFY_PROBE:   /* User plugged in or removed a video
                acpi_video_device_enumerate(video);
                acpi_video_device_rebind(video);
                acpi_video_switch_output(video, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_SWITCHVIDEOMODE;
                break;
  
        case ACPI_VIDEO_NOTIFY_CYCLE:   /* Cycle Display output hotkey pressed. */
-               acpi_bus_generate_event(device, event, 0);
 +              acpi_video_switch_output(video, event);
++              acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_SWITCHVIDEOMODE;
 +              break;
        case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT:     /* Next Display output hotkey pressed. */
-               acpi_bus_generate_event(device, event, 0);
 +              acpi_video_switch_output(video, event);
++              acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_VIDEO_NEXT;
 +              break;
        case ACPI_VIDEO_NOTIFY_PREV_OUTPUT:     /* previous Display output hotkey pressed. */
                acpi_video_switch_output(video, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_VIDEO_PREV;
                break;
  
        default:
 +              keycode = KEY_UNKNOWN;
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                  "Unsupported event [0x%x]\n", event));
                break;
        }
  
 +      input_report_key(input, keycode, 1);
 +      input_sync(input);
 +      input_report_key(input, keycode, 0);
 +      input_sync(input);
 +
        return;
  }
  
@@@ -1829,55 -1806,30 +1829,55 @@@ static void acpi_video_device_notify(ac
  {
        struct acpi_video_device *video_device = data;
        struct acpi_device *device = NULL;
 +      struct acpi_video_bus *bus;
 +      struct input_dev *input;
 +      int keycode;
  
        if (!video_device)
                return;
  
        device = video_device->dev;
 +      bus = video_device->video;
 +      input = bus->input;
  
        switch (event) {
 -      case ACPI_VIDEO_NOTIFY_SWITCH:  /* change in status (cycle output device) */
 -      case ACPI_VIDEO_NOTIFY_PROBE:   /* change in status (output device status) */
 +      case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS:        /* Cycle brightness */
 +              acpi_video_switch_brightness(video_device, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_BRIGHTNESS_CYCLE;
                break;
 -      case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS:        /* Cycle brightness */
        case ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS:  /* Increase brightness */
-               acpi_bus_generate_event(device, event, 0);
 +              acpi_video_switch_brightness(video_device, event);
++              acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_BRIGHTNESSUP;
 +              break;
        case ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS:  /* Decrease brightness */
-               acpi_bus_generate_event(device, event, 0);
 +              acpi_video_switch_brightness(video_device, event);
++              acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_BRIGHTNESSDOWN;
 +              break;
        case ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS: /* zero brightnesss */
-               acpi_bus_generate_event(device, event, 0);
 +              acpi_video_switch_brightness(video_device, event);
++              acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_BRIGHTNESS_ZERO;
 +              break;
        case ACPI_VIDEO_NOTIFY_DISPLAY_OFF:     /* display device off */
                acpi_video_switch_brightness(video_device, event);
-               acpi_bus_generate_event(device, event, 0);
+               acpi_bus_generate_proc_event(device, event, 0);
 +              keycode = KEY_DISPLAY_OFF;
                break;
        default:
 +              keycode = KEY_UNKNOWN;
                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                                  "Unsupported event [0x%x]\n", event));
                break;
        }
 +
 +      input_report_key(input, keycode, 1);
 +      input_sync(input);
 +      input_report_key(input, keycode, 0);
 +      input_sync(input);
 +
        return;
  }
  
@@@ -1886,7 -1838,6 +1886,7 @@@ static int acpi_video_bus_add(struct ac
        int result = 0;
        acpi_status status = 0;
        struct acpi_video_bus *video = NULL;
 +      struct input_dev *input;
  
  
        if (!device)
                goto end;
        }
  
 +
 +      video->input = input = input_allocate_device();
 +
 +      snprintf(video->phys, sizeof(video->phys),
 +              "%s/video/input0", acpi_device_hid(video->device));
 +
 +      input->name = acpi_device_name(video->device);
 +      input->phys = video->phys;
 +      input->id.bustype = BUS_HOST;
 +      input->id.product = 0x06;
 +      input->evbit[0] = BIT(EV_KEY);
 +      set_bit(KEY_SWITCHVIDEOMODE, input->keybit);
 +      set_bit(KEY_VIDEO_NEXT, input->keybit);
 +      set_bit(KEY_VIDEO_PREV, input->keybit);
 +      set_bit(KEY_BRIGHTNESS_CYCLE, input->keybit);
 +      set_bit(KEY_BRIGHTNESSUP, input->keybit);
 +      set_bit(KEY_BRIGHTNESSDOWN, input->keybit);
 +      set_bit(KEY_BRIGHTNESS_ZERO, input->keybit);
 +      set_bit(KEY_DISPLAY_OFF, input->keybit);
 +      set_bit(KEY_UNKNOWN, input->keybit);
 +      result = input_register_device(input);
 +      if (result) {
 +              acpi_remove_notify_handler(video->device->handle,
 +                                              ACPI_DEVICE_NOTIFY,
 +                                              acpi_video_bus_notify);
 +              acpi_video_bus_stop_devices(video);
 +              acpi_video_bus_put_devices(video);
 +              kfree(video->attached_array);
 +              acpi_video_bus_remove_fs(device);
 +              goto end;
 +        }
 +
 +
        printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s  rom: %s  post: %s)\n",
               ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device),
               video->flags.multihead ? "yes" : "no",
@@@ -1996,7 -1914,6 +1996,7 @@@ static int acpi_video_bus_remove(struc
        acpi_video_bus_put_devices(video);
        acpi_video_bus_remove_fs(device);
  
 +      input_unregister_device(video->input);
        kfree(video->attached_array);
        kfree(video);
  
@@@ -732,7 -732,7 +732,7 @@@ static void asus_hotk_notify(acpi_handl
                lcd_blank(FB_BLANK_POWERDOWN);
        }
  
-       acpi_bus_generate_event(hotk->device, event,
+       acpi_bus_generate_proc_event(hotk->device, event,
                                hotk->event_count[event % 128]++);
  
        return;
@@@ -1072,8 -1072,7 +1072,8 @@@ static void asus_backlight_exit(void
  }
  
  #define  ASUS_LED_UNREGISTER(object)                          \
 -      led_classdev_unregister(&object##_led)
 +      if (object##_led.dev)                                   \
 +              led_classdev_unregister(&object##_led)
  
  static void asus_led_exit(void)
  {
@@@ -855,15 -855,6 +855,15 @@@ static struct dmi_system_id sony_nc_ids
                                DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FE"),
                        },
                },
 +              {
 +                      .ident = "Sony Vaio FZ Series",
 +                      .callback = sony_nc_C_enable,
 +                      .driver_data = sony_C_events,
 +                      .matches = {
 +                              DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
 +                              DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ"),
 +                      },
 +              },
                {
                        .ident = "Sony Vaio C Series",
                        .callback = sony_nc_C_enable,
@@@ -913,7 -904,7 +913,7 @@@ static void sony_acpi_notify(acpi_handl
  
        dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
        sony_laptop_report_input_event(ev);
-       acpi_bus_generate_event(sony_nc_acpi_device, 1, ev);
+       acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
  }
  
  static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@@ -2301,7 -2292,7 +2301,7 @@@ static irqreturn_t sony_pic_irq(int irq
  
  found:
        sony_laptop_report_input_event(device_event);
-       acpi_bus_generate_event(spic_dev.acpi_dev, 1, device_event);
+       acpi_bus_generate_proc_event(spic_dev.acpi_dev, 1, device_event);
        sonypi_compat_report_event(device_event);
  
        return IRQ_HANDLED;
@@@ -2317,6 -2308,8 +2317,6 @@@ static int sony_pic_remove(struct acpi_
        struct sony_pic_ioport *io, *tmp_io;
        struct sony_pic_irq *irq, *tmp_irq;
  
 -      sonypi_compat_exit();
 -
        if (sony_pic_disable(device)) {
                printk(KERN_ERR DRV_PFX "Couldn't disable device.\n");
                return -ENXIO;
        release_region(spic_dev.cur_ioport->io.minimum,
                        spic_dev.cur_ioport->io.address_length);
  
 +      sonypi_compat_exit();
 +
        sony_laptop_remove_input();
  
        /* pf attrs */
@@@ -2393,9 -2384,6 +2393,9 @@@ static int sony_pic_add(struct acpi_dev
                goto err_free_resources;
        }
  
 +      if (sonypi_compat_init())
 +              goto err_remove_input;
 +
        /* request io port */
        list_for_each_entry(io, &spic_dev.ioports, list) {
                if (request_region(io->io.minimum, io->io.address_length,
        if (!spic_dev.cur_ioport) {
                printk(KERN_ERR DRV_PFX "Failed to request_region.\n");
                result = -ENODEV;
 -              goto err_remove_input;
 +              goto err_remove_compat;
        }
  
        /* request IRQ */
        if (result)
                goto err_remove_pf;
  
 -      if (sonypi_compat_init())
 -              goto err_remove_pf;
 -
        return 0;
  
  err_remove_pf:
@@@ -2465,9 -2456,6 +2465,9 @@@ err_release_region
        release_region(spic_dev.cur_ioport->io.minimum,
                        spic_dev.cur_ioport->io.address_length);
  
 +err_remove_compat:
 +      sonypi_compat_exit();
 +
  err_remove_input:
        sony_laptop_remove_input();
  
@@@ -267,7 -267,10 +267,10 @@@ static void ibm_handle_events(acpi_hand
  
        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;
  }
@@@ -399,7 -402,7 +402,7 @@@ static acpi_status __init ibm_find_acpi
  
        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';