aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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