aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/pxa2xx_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/pxa2xx_spi.c')
-rw-r--r--drivers/spi/pxa2xx_spi.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index 31dd56f0dae9..c8c2b693ffac 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1668,10 +1668,9 @@ static void pxa2xx_spi_shutdown(struct platform_device *pdev)
1668} 1668}
1669 1669
1670#ifdef CONFIG_PM 1670#ifdef CONFIG_PM
1671 1671static int pxa2xx_spi_suspend(struct device *dev)
1672static int pxa2xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
1673{ 1672{
1674 struct driver_data *drv_data = platform_get_drvdata(pdev); 1673 struct driver_data *drv_data = dev_get_drvdata(dev);
1675 struct ssp_device *ssp = drv_data->ssp; 1674 struct ssp_device *ssp = drv_data->ssp;
1676 int status = 0; 1675 int status = 0;
1677 1676
@@ -1684,9 +1683,9 @@ static int pxa2xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
1684 return 0; 1683 return 0;
1685} 1684}
1686 1685
1687static int pxa2xx_spi_resume(struct platform_device *pdev) 1686static int pxa2xx_spi_resume(struct device *dev)
1688{ 1687{
1689 struct driver_data *drv_data = platform_get_drvdata(pdev); 1688 struct driver_data *drv_data = dev_get_drvdata(dev);
1690 struct ssp_device *ssp = drv_data->ssp; 1689 struct ssp_device *ssp = drv_data->ssp;
1691 int status = 0; 1690 int status = 0;
1692 1691
@@ -1703,26 +1702,29 @@ static int pxa2xx_spi_resume(struct platform_device *pdev)
1703 /* Start the queue running */ 1702 /* Start the queue running */
1704 status = start_queue(drv_data); 1703 status = start_queue(drv_data);
1705 if (status != 0) { 1704 if (status != 0) {
1706 dev_err(&pdev->dev, "problem starting queue (%d)\n", status); 1705 dev_err(dev, "problem starting queue (%d)\n", status);
1707 return status; 1706 return status;
1708 } 1707 }
1709 1708
1710 return 0; 1709 return 0;
1711} 1710}
1712#else 1711
1713#define pxa2xx_spi_suspend NULL 1712static struct dev_pm_ops pxa2xx_spi_pm_ops = {
1714#define pxa2xx_spi_resume NULL 1713 .suspend = pxa2xx_spi_suspend,
1715#endif /* CONFIG_PM */ 1714 .resume = pxa2xx_spi_resume,
1715};
1716#endif
1716 1717
1717static struct platform_driver driver = { 1718static struct platform_driver driver = {
1718 .driver = { 1719 .driver = {
1719 .name = "pxa2xx-spi", 1720 .name = "pxa2xx-spi",
1720 .owner = THIS_MODULE, 1721 .owner = THIS_MODULE,
1722#ifdef CONFIG_PM
1723 .pm = &pxa2xx_spi_pm_ops,
1724#endif
1721 }, 1725 },
1722 .remove = pxa2xx_spi_remove, 1726 .remove = pxa2xx_spi_remove,
1723 .shutdown = pxa2xx_spi_shutdown, 1727 .shutdown = pxa2xx_spi_shutdown,
1724 .suspend = pxa2xx_spi_suspend,
1725 .resume = pxa2xx_spi_resume,
1726}; 1728};
1727 1729
1728static int __init pxa2xx_spi_init(void) 1730static int __init pxa2xx_spi_init(void)