Re: Driver for HP harddisk protection LED

From: Andrew Morton
Date: Thu Oct 16 2008 - 18:56:20 EST


On Thu, 16 Oct 2008 11:10:16 +0200
Pavel Machek <pavel@xxxxxxx> wrote:

> HP notebooks contain accelerometer-based disk protection subsystem,
> and LED that indicates hard disk is protected. This is driver for the
> LED part.

- fix comment typo

- use standard suspend/resume ifdef avoidance trick


drivers/leds/leds-hp-disk.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/leds/leds-hp-disk.c~leds-driver-for-hp-harddisk-protection-led-fix
+++ a/drivers/leds/leds-hp-disk.c
@@ -49,7 +49,7 @@ static struct acpi_hpled adev;

static acpi_status hpled_acpi_write(acpi_handle handle, int reg)
{
- unsigned long ret; /* Not used when writting */
+ unsigned long ret; /* Not used when writing */
union acpi_object in_obj[1];
struct acpi_object_list args = { 1, in_obj };

@@ -83,6 +83,9 @@ static int hpled_resume(struct acpi_devi
led_classdev_resume(&hpled_led);
return 0;
}
+#else
+#define hpled_suspend NULL
+#define hpled_resume NULL
#endif

static int hpled_add(struct acpi_device *device)
@@ -119,10 +122,8 @@ static struct acpi_driver leds_hp_driver
.ops = {
.add = hpled_add,
.remove = hpled_remove,
-#ifdef CONFIG_PM
.suspend = hpled_suspend,
.resume = hpled_resume,
-#endif
}
};

_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/