diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-03-26 02:47:19 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-04-01 14:04:54 -0400 |
commit | df92d5ff5e70999274f53884cc2c40ae620a109a (patch) | |
tree | bbc6ed75da0e0753242ef1db9387c75fc63ea15a /drivers/leds | |
parent | cceba0e4b8f41a495dc7a5ab2795dcab0ddb64c1 (diff) |
leds: leds-asic3: switch to using SIMPLE_DEV_PM_OPS
Switch to using SIMPLE_DEV_PM_OPS macro to declare the driver's
pm_ops. It reduces code size. Also, CONFIG_PM_SLEEP is added to
suspend/ resume functions to prevent build warnings when
CONFIG_PM_SLEEP is not selected.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-asic3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/leds/leds-asic3.c b/drivers/leds/leds-asic3.c index b474745e001b..cf9efe421c2b 100644 --- a/drivers/leds/leds-asic3.c +++ b/drivers/leds/leds-asic3.c | |||
@@ -134,6 +134,7 @@ static int asic3_led_remove(struct platform_device *pdev) | |||
134 | return mfd_cell_disable(pdev); | 134 | return mfd_cell_disable(pdev); |
135 | } | 135 | } |
136 | 136 | ||
137 | #ifdef CONFIG_PM_SLEEP | ||
137 | static int asic3_led_suspend(struct device *dev) | 138 | static int asic3_led_suspend(struct device *dev) |
138 | { | 139 | { |
139 | struct platform_device *pdev = to_platform_device(dev); | 140 | struct platform_device *pdev = to_platform_device(dev); |
@@ -159,11 +160,9 @@ static int asic3_led_resume(struct device *dev) | |||
159 | 160 | ||
160 | return ret; | 161 | return ret; |
161 | } | 162 | } |
163 | #endif | ||
162 | 164 | ||
163 | static const struct dev_pm_ops asic3_led_pm_ops = { | 165 | static SIMPLE_DEV_PM_OPS(asic3_led_pm_ops, asic3_led_suspend, asic3_led_resume); |
164 | .suspend = asic3_led_suspend, | ||
165 | .resume = asic3_led_resume, | ||
166 | }; | ||
167 | 166 | ||
168 | static struct platform_driver asic3_led_driver = { | 167 | static struct platform_driver asic3_led_driver = { |
169 | .probe = asic3_led_probe, | 168 | .probe = asic3_led_probe, |