diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-01-08 12:55:03 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-01-08 12:55:03 -0500 |
commit | 859cb7f2a4244ea6da206d3fe9cc8a6810947a68 (patch) | |
tree | 3389fe6c191418d6acc30d84e11a0760608f7431 /drivers/leds/leds-hp-disk.c | |
parent | 0081e8020ebd814a99e45720a10e869a54ee08a6 (diff) |
leds: Add suspend/resume to the core class
Add suspend/resume to the core class and remove all the now unneeded
code from various drivers. Originally the class code couldn't support
suspend/resume but since class_device can there is no reason for
each driver doing its own suspend/resume anymore.
Diffstat (limited to 'drivers/leds/leds-hp-disk.c')
-rw-r--r-- | drivers/leds/leds-hp-disk.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/leds/leds-hp-disk.c b/drivers/leds/leds-hp-disk.c index 44fa757d8254..d786adc8c5e3 100644 --- a/drivers/leds/leds-hp-disk.c +++ b/drivers/leds/leds-hp-disk.c | |||
@@ -68,25 +68,9 @@ static struct led_classdev hpled_led = { | |||
68 | .name = "hp:red:hddprotection", | 68 | .name = "hp:red:hddprotection", |
69 | .default_trigger = "heartbeat", | 69 | .default_trigger = "heartbeat", |
70 | .brightness_set = hpled_set, | 70 | .brightness_set = hpled_set, |
71 | .flags = LED_CORE_SUSPENDRESUME, | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | #ifdef CONFIG_PM | ||
74 | static int hpled_suspend(struct acpi_device *dev, pm_message_t state) | ||
75 | { | ||
76 | led_classdev_suspend(&hpled_led); | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static int hpled_resume(struct acpi_device *dev) | ||
81 | { | ||
82 | led_classdev_resume(&hpled_led); | ||
83 | return 0; | ||
84 | } | ||
85 | #else | ||
86 | #define hpled_suspend NULL | ||
87 | #define hpled_resume NULL | ||
88 | #endif | ||
89 | |||
90 | static int hpled_add(struct acpi_device *device) | 74 | static int hpled_add(struct acpi_device *device) |
91 | { | 75 | { |
92 | int ret; | 76 | int ret; |
@@ -121,8 +105,6 @@ static struct acpi_driver leds_hp_driver = { | |||
121 | .ops = { | 105 | .ops = { |
122 | .add = hpled_add, | 106 | .add = hpled_add, |
123 | .remove = hpled_remove, | 107 | .remove = hpled_remove, |
124 | .suspend = hpled_suspend, | ||
125 | .resume = hpled_resume, | ||
126 | } | 108 | } |
127 | }; | 109 | }; |
128 | 110 | ||