Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jingoo Han and committed by
Bryan Wu
df92d5ff cceba0e4

+3 -4
+3 -4
drivers/leds/leds-asic3.c
··· 134 134 return mfd_cell_disable(pdev); 135 135 } 136 136 137 + #ifdef CONFIG_PM_SLEEP 137 138 static int asic3_led_suspend(struct device *dev) 138 139 { 139 140 struct platform_device *pdev = to_platform_device(dev); ··· 160 159 161 160 return ret; 162 161 } 162 + #endif 163 163 164 - static const struct dev_pm_ops asic3_led_pm_ops = { 165 - .suspend = asic3_led_suspend, 166 - .resume = asic3_led_resume, 167 - }; 164 + static SIMPLE_DEV_PM_OPS(asic3_led_pm_ops, asic3_led_suspend, asic3_led_resume); 168 165 169 166 static struct platform_driver asic3_led_driver = { 170 167 .probe = asic3_led_probe,