aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorKim Kyuwon <chammoru@gmail.com>2009-06-10 15:48:48 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2009-06-23 15:19:10 -0400
commitb8389018212e8c4e03ede4df5405796100ef4390 (patch)
treeb3628528212ecc6eadcece26e6807c396afed843 /drivers/leds
parentd888a4c76c51092993643f8992bf55b3c28da483 (diff)
leds: fix led-bd2802 errors while resuming
LED_CORE_SUSPENDRESUME flag is not needed in the bd2802 driver, because all works for suspend/resume is done in bd2802_suspend and bd2802_suspend functions. And this patch allows bd2802 to be configured again when it resumes from suspend. Signed-off-by: Kim Kyuwon <q1.kim@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-bd2802.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c
index 4149ecb3a9b2..6832b9fd0422 100644
--- a/drivers/leds/leds-bd2802.c
+++ b/drivers/leds/leds-bd2802.c
@@ -538,7 +538,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
538 led->cdev_led1r.brightness = LED_OFF; 538 led->cdev_led1r.brightness = LED_OFF;
539 led->cdev_led1r.brightness_set = bd2802_set_led1r_brightness; 539 led->cdev_led1r.brightness_set = bd2802_set_led1r_brightness;
540 led->cdev_led1r.blink_set = bd2802_set_led1r_blink; 540 led->cdev_led1r.blink_set = bd2802_set_led1r_blink;
541 led->cdev_led1r.flags |= LED_CORE_SUSPENDRESUME;
542 541
543 ret = led_classdev_register(&led->client->dev, &led->cdev_led1r); 542 ret = led_classdev_register(&led->client->dev, &led->cdev_led1r);
544 if (ret < 0) { 543 if (ret < 0) {
@@ -551,7 +550,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
551 led->cdev_led1g.brightness = LED_OFF; 550 led->cdev_led1g.brightness = LED_OFF;
552 led->cdev_led1g.brightness_set = bd2802_set_led1g_brightness; 551 led->cdev_led1g.brightness_set = bd2802_set_led1g_brightness;
553 led->cdev_led1g.blink_set = bd2802_set_led1g_blink; 552 led->cdev_led1g.blink_set = bd2802_set_led1g_blink;
554 led->cdev_led1g.flags |= LED_CORE_SUSPENDRESUME;
555 553
556 ret = led_classdev_register(&led->client->dev, &led->cdev_led1g); 554 ret = led_classdev_register(&led->client->dev, &led->cdev_led1g);
557 if (ret < 0) { 555 if (ret < 0) {
@@ -564,7 +562,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
564 led->cdev_led1b.brightness = LED_OFF; 562 led->cdev_led1b.brightness = LED_OFF;
565 led->cdev_led1b.brightness_set = bd2802_set_led1b_brightness; 563 led->cdev_led1b.brightness_set = bd2802_set_led1b_brightness;
566 led->cdev_led1b.blink_set = bd2802_set_led1b_blink; 564 led->cdev_led1b.blink_set = bd2802_set_led1b_blink;
567 led->cdev_led1b.flags |= LED_CORE_SUSPENDRESUME;
568 565
569 ret = led_classdev_register(&led->client->dev, &led->cdev_led1b); 566 ret = led_classdev_register(&led->client->dev, &led->cdev_led1b);
570 if (ret < 0) { 567 if (ret < 0) {
@@ -577,7 +574,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
577 led->cdev_led2r.brightness = LED_OFF; 574 led->cdev_led2r.brightness = LED_OFF;
578 led->cdev_led2r.brightness_set = bd2802_set_led2r_brightness; 575 led->cdev_led2r.brightness_set = bd2802_set_led2r_brightness;
579 led->cdev_led2r.blink_set = bd2802_set_led2r_blink; 576 led->cdev_led2r.blink_set = bd2802_set_led2r_blink;
580 led->cdev_led2r.flags |= LED_CORE_SUSPENDRESUME;
581 577
582 ret = led_classdev_register(&led->client->dev, &led->cdev_led2r); 578 ret = led_classdev_register(&led->client->dev, &led->cdev_led2r);
583 if (ret < 0) { 579 if (ret < 0) {
@@ -590,7 +586,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
590 led->cdev_led2g.brightness = LED_OFF; 586 led->cdev_led2g.brightness = LED_OFF;
591 led->cdev_led2g.brightness_set = bd2802_set_led2g_brightness; 587 led->cdev_led2g.brightness_set = bd2802_set_led2g_brightness;
592 led->cdev_led2g.blink_set = bd2802_set_led2g_blink; 588 led->cdev_led2g.blink_set = bd2802_set_led2g_blink;
593 led->cdev_led2g.flags |= LED_CORE_SUSPENDRESUME;
594 589
595 ret = led_classdev_register(&led->client->dev, &led->cdev_led2g); 590 ret = led_classdev_register(&led->client->dev, &led->cdev_led2g);
596 if (ret < 0) { 591 if (ret < 0) {
@@ -723,8 +718,7 @@ static int bd2802_resume(struct i2c_client *client)
723 struct bd2802_led *led = i2c_get_clientdata(client); 718 struct bd2802_led *led = i2c_get_clientdata(client);
724 719
725 if (!bd2802_is_all_off(led) || led->adf_on) { 720 if (!bd2802_is_all_off(led) || led->adf_on) {
726 gpio_set_value(led->pdata->reset_gpio, 1); 721 bd2802_reset_cancel(led);
727 udelay(100);
728 bd2802_restore_state(led); 722 bd2802_restore_state(led);
729 } 723 }
730 724