diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 11:02:24 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 11:02:30 -0400 |
commit | 28f9f19db9dda54c851d5689539d86f6fc008773 (patch) | |
tree | 469f5d7b24871b6fe001b7ad9acac859405f4822 /drivers/spi | |
parent | 40262b2b6efac507005a2c981175266bf81152a7 (diff) | |
parent | 52a7a1cec88acdaf3f8b36a6b1fe904f6eca7ee5 (diff) |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/pxa2xx_spi.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index d949dbf1141f..8a1fb608e8f1 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 | 1671 | static int pxa2xx_spi_suspend(struct device *dev) | |
1672 | static 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 | ||
1687 | static int pxa2xx_spi_resume(struct platform_device *pdev) | 1686 | static 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 | 1712 | static 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 | ||
1717 | static struct platform_driver driver = { | 1718 | static 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 | ||
1728 | static int __init pxa2xx_spi_init(void) | 1730 | static int __init pxa2xx_spi_init(void) |