diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-04-07 05:14:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-10 08:02:54 -0400 |
commit | 3aff5b122b7e01945ba787df306c182bae9f6762 (patch) | |
tree | 71610f8620b56abe36213de546ab614e4ec78e56 /drivers/video | |
parent | d0df9a2c8f856b290407dec1069eb320b4bbb705 (diff) |
OMAPDSS: nec-nl8048 panel: Use dev_pm_ops
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c index c4e9c2b1b465..bd3ad8830a54 100644 --- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c | |||
@@ -303,16 +303,22 @@ static int nec_8048_spi_remove(struct spi_device *spi) | |||
303 | return 0; | 303 | return 0; |
304 | } | 304 | } |
305 | 305 | ||
306 | static int nec_8048_spi_suspend(struct spi_device *spi, pm_message_t mesg) | 306 | #ifdef CONFIG_PM_SLEEP |
307 | |||
308 | static int nec_8048_spi_suspend(struct device *dev) | ||
307 | { | 309 | { |
310 | struct spi_device *spi = to_spi_device(dev); | ||
311 | |||
308 | nec_8048_spi_send(spi, 2, 0x01); | 312 | nec_8048_spi_send(spi, 2, 0x01); |
309 | mdelay(40); | 313 | mdelay(40); |
310 | 314 | ||
311 | return 0; | 315 | return 0; |
312 | } | 316 | } |
313 | 317 | ||
314 | static int nec_8048_spi_resume(struct spi_device *spi) | 318 | static int nec_8048_spi_resume(struct device *dev) |
315 | { | 319 | { |
320 | struct spi_device *spi = to_spi_device(dev); | ||
321 | |||
316 | /* reinitialize the panel */ | 322 | /* reinitialize the panel */ |
317 | spi_setup(spi); | 323 | spi_setup(spi); |
318 | nec_8048_spi_send(spi, 2, 0x00); | 324 | nec_8048_spi_send(spi, 2, 0x00); |
@@ -321,14 +327,20 @@ static int nec_8048_spi_resume(struct spi_device *spi) | |||
321 | return 0; | 327 | return 0; |
322 | } | 328 | } |
323 | 329 | ||
330 | static SIMPLE_DEV_PM_OPS(nec_8048_spi_pm_ops, nec_8048_spi_suspend, | ||
331 | nec_8048_spi_resume); | ||
332 | #define NEC_8048_SPI_PM_OPS (&nec_8048_spi_pm_ops) | ||
333 | #else | ||
334 | #define NEC_8048_SPI_PM_OPS NULL | ||
335 | #endif | ||
336 | |||
324 | static struct spi_driver nec_8048_spi_driver = { | 337 | static struct spi_driver nec_8048_spi_driver = { |
325 | .probe = nec_8048_spi_probe, | 338 | .probe = nec_8048_spi_probe, |
326 | .remove = nec_8048_spi_remove, | 339 | .remove = nec_8048_spi_remove, |
327 | .suspend = nec_8048_spi_suspend, | ||
328 | .resume = nec_8048_spi_resume, | ||
329 | .driver = { | 340 | .driver = { |
330 | .name = "nec_8048_spi", | 341 | .name = "nec_8048_spi", |
331 | .owner = THIS_MODULE, | 342 | .owner = THIS_MODULE, |
343 | .pm = NEC_8048_SPI_PM_OPS, | ||
332 | }, | 344 | }, |
333 | }; | 345 | }; |
334 | 346 | ||