aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-alix2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-alix2.c')
-rw-r--r--drivers/leds/leds-alix2.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/leds/leds-alix2.c b/drivers/leds/leds-alix2.c
index d7666e6cb425..ddbd7730dfc8 100644
--- a/drivers/leds/leds-alix2.c
+++ b/drivers/leds/leds-alix2.c
@@ -65,39 +65,13 @@ static struct alix_led alix_leds[] = {
65 }, 65 },
66}; 66};
67 67
68#ifdef CONFIG_PM
69
70static int alix_led_suspend(struct platform_device *dev, pm_message_t state)
71{
72 int i;
73
74 for (i = 0; i < ARRAY_SIZE(alix_leds); i++)
75 led_classdev_suspend(&alix_leds[i].cdev);
76 return 0;
77}
78
79static int alix_led_resume(struct platform_device *dev)
80{
81 int i;
82
83 for (i = 0; i < ARRAY_SIZE(alix_leds); i++)
84 led_classdev_resume(&alix_leds[i].cdev);
85 return 0;
86}
87
88#else
89
90#define alix_led_suspend NULL
91#define alix_led_resume NULL
92
93#endif
94
95static int __init alix_led_probe(struct platform_device *pdev) 68static int __init alix_led_probe(struct platform_device *pdev)
96{ 69{
97 int i; 70 int i;
98 int ret; 71 int ret;
99 72
100 for (i = 0; i < ARRAY_SIZE(alix_leds); i++) { 73 for (i = 0; i < ARRAY_SIZE(alix_leds); i++) {
74 alix_leds[i].cdev.flags |= LED_CORE_SUSPENDRESUME;
101 ret = led_classdev_register(&pdev->dev, &alix_leds[i].cdev); 75 ret = led_classdev_register(&pdev->dev, &alix_leds[i].cdev);
102 if (ret < 0) 76 if (ret < 0)
103 goto fail; 77 goto fail;
@@ -121,8 +95,6 @@ static int alix_led_remove(struct platform_device *pdev)
121 95
122static struct platform_driver alix_led_driver = { 96static struct platform_driver alix_led_driver = {
123 .remove = alix_led_remove, 97 .remove = alix_led_remove,
124 .suspend = alix_led_suspend,
125 .resume = alix_led_resume,
126 .driver = { 98 .driver = {
127 .name = KBUILD_MODNAME, 99 .name = KBUILD_MODNAME,
128 .owner = THIS_MODULE, 100 .owner = THIS_MODULE,