diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-06-14 18:07:38 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-06-14 18:07:38 -0400 |
commit | 6daa79b3c113bf95793aee95fcfb4008e85614eb (patch) | |
tree | b079d216ef2cc2e8d0b3c4dd451025f4ba719157 /drivers/serial | |
parent | 0c50f6f38399685d0c9ef0f5ffd6c4955e31cb26 (diff) |
serial: sh-sci: Move over to dev_pm_ops.
Presently the boot log whines about suspend/resume hooks at the platform
driver level, move these over to dev_pm_ops.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/sh-sci.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index a4cf1079b312..66f52674ca0c 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -1332,44 +1332,46 @@ err_unreg: | |||
1332 | return ret; | 1332 | return ret; |
1333 | } | 1333 | } |
1334 | 1334 | ||
1335 | static int sci_suspend(struct platform_device *dev, pm_message_t state) | 1335 | static int sci_suspend(struct device *dev) |
1336 | { | 1336 | { |
1337 | struct sh_sci_priv *priv = platform_get_drvdata(dev); | 1337 | struct sh_sci_priv *priv = dev_get_drvdata(dev); |
1338 | struct sci_port *p; | 1338 | struct sci_port *p; |
1339 | unsigned long flags; | 1339 | unsigned long flags; |
1340 | 1340 | ||
1341 | spin_lock_irqsave(&priv->lock, flags); | 1341 | spin_lock_irqsave(&priv->lock, flags); |
1342 | list_for_each_entry(p, &priv->ports, node) | 1342 | list_for_each_entry(p, &priv->ports, node) |
1343 | uart_suspend_port(&sci_uart_driver, &p->port); | 1343 | uart_suspend_port(&sci_uart_driver, &p->port); |
1344 | |||
1345 | spin_unlock_irqrestore(&priv->lock, flags); | 1344 | spin_unlock_irqrestore(&priv->lock, flags); |
1346 | 1345 | ||
1347 | return 0; | 1346 | return 0; |
1348 | } | 1347 | } |
1349 | 1348 | ||
1350 | static int sci_resume(struct platform_device *dev) | 1349 | static int sci_resume(struct device *dev) |
1351 | { | 1350 | { |
1352 | struct sh_sci_priv *priv = platform_get_drvdata(dev); | 1351 | struct sh_sci_priv *priv = dev_get_drvdata(dev); |
1353 | struct sci_port *p; | 1352 | struct sci_port *p; |
1354 | unsigned long flags; | 1353 | unsigned long flags; |
1355 | 1354 | ||
1356 | spin_lock_irqsave(&priv->lock, flags); | 1355 | spin_lock_irqsave(&priv->lock, flags); |
1357 | list_for_each_entry(p, &priv->ports, node) | 1356 | list_for_each_entry(p, &priv->ports, node) |
1358 | uart_resume_port(&sci_uart_driver, &p->port); | 1357 | uart_resume_port(&sci_uart_driver, &p->port); |
1359 | |||
1360 | spin_unlock_irqrestore(&priv->lock, flags); | 1358 | spin_unlock_irqrestore(&priv->lock, flags); |
1361 | 1359 | ||
1362 | return 0; | 1360 | return 0; |
1363 | } | 1361 | } |
1364 | 1362 | ||
1363 | static struct dev_pm_ops sci_dev_pm_ops = { | ||
1364 | .suspend = sci_suspend, | ||
1365 | .resume = sci_resume, | ||
1366 | }; | ||
1367 | |||
1365 | static struct platform_driver sci_driver = { | 1368 | static struct platform_driver sci_driver = { |
1366 | .probe = sci_probe, | 1369 | .probe = sci_probe, |
1367 | .remove = __devexit_p(sci_remove), | 1370 | .remove = __devexit_p(sci_remove), |
1368 | .suspend = sci_suspend, | ||
1369 | .resume = sci_resume, | ||
1370 | .driver = { | 1371 | .driver = { |
1371 | .name = "sh-sci", | 1372 | .name = "sh-sci", |
1372 | .owner = THIS_MODULE, | 1373 | .owner = THIS_MODULE, |
1374 | .pm = &sci_dev_pm_ops, | ||
1373 | }, | 1375 | }, |
1374 | }; | 1376 | }; |
1375 | 1377 | ||