aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/leds/leds-bd2802.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c
index 9f9177d29ed7..2db04231a792 100644
--- a/drivers/leds/leds-bd2802.c
+++ b/drivers/leds/leds-bd2802.c
@@ -747,8 +747,7 @@ static int bd2802_remove(struct i2c_client *client)
747 return 0; 747 return 0;
748} 748}
749 749
750#ifdef CONFIG_PM 750#ifdef CONFIG_PM_SLEEP
751
752static void bd2802_restore_state(struct bd2802_led *led) 751static void bd2802_restore_state(struct bd2802_led *led)
753{ 752{
754 int i; 753 int i;
@@ -785,12 +784,9 @@ static int bd2802_resume(struct device *dev)
785 784
786 return 0; 785 return 0;
787} 786}
787#endif
788 788
789static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume); 789static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume);
790#define BD2802_PM (&bd2802_pm)
791#else /* CONFIG_PM */
792#define BD2802_PM NULL
793#endif
794 790
795static const struct i2c_device_id bd2802_id[] = { 791static const struct i2c_device_id bd2802_id[] = {
796 { "BD2802", 0 }, 792 { "BD2802", 0 },
@@ -801,7 +797,7 @@ MODULE_DEVICE_TABLE(i2c, bd2802_id);
801static struct i2c_driver bd2802_i2c_driver = { 797static struct i2c_driver bd2802_i2c_driver = {
802 .driver = { 798 .driver = {
803 .name = "BD2802", 799 .name = "BD2802",
804 .pm = BD2802_PM, 800 .pm = &bd2802_pm,
805 }, 801 },
806 .probe = bd2802_probe, 802 .probe = bd2802_probe,
807 .remove = bd2802_remove, 803 .remove = bd2802_remove,