diff options
-rw-r--r-- | drivers/watchdog/dw_wdt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index e621098bf663..4d3906d7c9a5 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c | |||
@@ -252,7 +252,7 @@ static int dw_wdt_release(struct inode *inode, struct file *filp) | |||
252 | return 0; | 252 | return 0; |
253 | } | 253 | } |
254 | 254 | ||
255 | #ifdef CONFIG_PM | 255 | #ifdef CONFIG_PM_SLEEP |
256 | static int dw_wdt_suspend(struct device *dev) | 256 | static int dw_wdt_suspend(struct device *dev) |
257 | { | 257 | { |
258 | clk_disable(dw_wdt.clk); | 258 | clk_disable(dw_wdt.clk); |
@@ -271,12 +271,9 @@ static int dw_wdt_resume(struct device *dev) | |||
271 | 271 | ||
272 | return 0; | 272 | return 0; |
273 | } | 273 | } |
274 | #endif /* CONFIG_PM_SLEEP */ | ||
274 | 275 | ||
275 | static const struct dev_pm_ops dw_wdt_pm_ops = { | 276 | static SIMPLE_DEV_PM_OPS(dw_wdt_pm_ops, dw_wdt_suspend, dw_wdt_resume); |
276 | .suspend = dw_wdt_suspend, | ||
277 | .resume = dw_wdt_resume, | ||
278 | }; | ||
279 | #endif /* CONFIG_PM */ | ||
280 | 277 | ||
281 | static const struct file_operations wdt_fops = { | 278 | static const struct file_operations wdt_fops = { |
282 | .owner = THIS_MODULE, | 279 | .owner = THIS_MODULE, |
@@ -346,9 +343,7 @@ static struct platform_driver dw_wdt_driver = { | |||
346 | .driver = { | 343 | .driver = { |
347 | .name = "dw_wdt", | 344 | .name = "dw_wdt", |
348 | .owner = THIS_MODULE, | 345 | .owner = THIS_MODULE, |
349 | #ifdef CONFIG_PM | ||
350 | .pm = &dw_wdt_pm_ops, | 346 | .pm = &dw_wdt_pm_ops, |
351 | #endif /* CONFIG_PM */ | ||
352 | }, | 347 | }, |
353 | }; | 348 | }; |
354 | 349 | ||