Only in linux-mm/.tmp_versions: scsi_wait_scan.mod diff -ur linux-mm.middle/drivers/hwmon/.hp_accel.o.cmd linux-mm/drivers/hwmon/.hp_accel.o.cmd --- linux-mm.middle/drivers/hwmon/.hp_accel.o.cmd 2008-11-06 12:30:58.000000000 +0100 +++ linux-mm/drivers/hwmon/.hp_accel.o.cmd 2008-11-10 09:12:22.000000000 +0100 @@ -538,6 +538,9 @@ $(wildcard include/config/cgroup/freezer.h) \ include/linux/version.h \ include/linux/uaccess.h \ + include/linux/leds.h \ + $(wildcard include/config/leds/triggers.h) \ + $(wildcard include/config/leds/trigger/ide/disk.h) \ include/acpi/acpi_drivers.h \ $(wildcard include/config/acpi/power.h) \ $(wildcard include/config/acpi/ec.h) \ diff -ur linux-mm.middle/drivers/hwmon/hp_accel.c linux-mm/drivers/hwmon/hp_accel.c --- linux-mm.middle/drivers/hwmon/hp_accel.c 2008-11-06 12:26:03.000000000 +0100 +++ linux-mm/drivers/hwmon/hp_accel.c 2008-11-10 09:11:40.000000000 +0100 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include "lis3lv02d.h" @@ -155,9 +156,34 @@ }; +static acpi_status hpled_acpi_write(acpi_handle handle, int reg) +{ + unsigned long long ret; /* Not used when writing */ + union acpi_object in_obj[1]; + struct acpi_object_list args = { 1, in_obj }; + + in_obj[0].type = ACPI_TYPE_INTEGER; + in_obj[0].integer.value = reg; + + return acpi_evaluate_integer(handle, "ALED", &args, &ret); +} + +static void hpled_set(struct led_classdev *led_cdev, + enum led_brightness value) +{ + hpled_acpi_write(adev.device->handle, !!value); +} + +static struct led_classdev hpled_led = { + .name = "hp:red:hddprotection", + .default_trigger = "heartbeat", + .brightness_set = hpled_set, +}; + static int lis3lv02d_add(struct acpi_device *device) { u8 val; + int ret; if (!device) return -EINVAL; @@ -183,7 +209,17 @@ adev.ac = lis3lv02d_axis_normal; } - return lis3lv02d_init_device(&adev); + ret = led_classdev_register(NULL, &hpled_led); + if (ret) + return ret; + + ret = lis3lv02d_init_device(&adev); + if (ret) { + led_classdev_unregister(&hpled_led); + return ret; + } + + return ret; } static int lis3lv02d_remove(struct acpi_device *device, int type) @@ -194,6 +230,8 @@ lis3lv02d_joystick_disable(); lis3lv02d_poweroff(device->handle); + led_classdev_unregister(&hpled_led); + return lis3lv02d_remove_fs(); } @@ -203,6 +241,7 @@ { /* make sure the device is off when we suspend */ lis3lv02d_poweroff(device->handle); + led_classdev_suspend(&hpled_led); return 0; } @@ -215,6 +254,7 @@ else lis3lv02d_poweroff(device->handle); mutex_unlock(&adev.lock); + led_classdev_resume(&hpled_led); return 0; } #else Binary files linux-mm.middle/drivers/hwmon/hp_accel.ko and linux-mm/drivers/hwmon/hp_accel.ko differ Binary files linux-mm.middle/drivers/hwmon/hp_accel.o and linux-mm/drivers/hwmon/hp_accel.o differ diff -ur linux-mm.middle/modules.order linux-mm/modules.order --- linux-mm.middle/modules.order 2008-11-10 08:56:49.000000000 +0100 +++ linux-mm/modules.order 2008-11-10 09:16:23.000000000 +0100 @@ -0,0 +1,8 @@ +kernel/drivers/block/nbd.ko +kernel/drivers/scsi/scsi_wait_scan.ko +kernel/drivers/input/ff-memless.ko +kernel/drivers/hwmon/lis3lv02d.ko +kernel/drivers/hwmon/hp_accel.ko +kernel/drivers/hid/hid-dummy.ko +kernel/drivers/hid/hid-tmff.ko +kernel/drivers/hid/hid-zpff.ko