[ARM] pxa: update pxa2xx-spi.c to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:
parent
b7f3f59b48
commit
86d2593afe
|
@ -1668,10 +1668,9 @@ static void pxa2xx_spi_shutdown(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
static int pxa2xx_spi_suspend(struct device *dev)
|
||||||
static int pxa2xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
|
|
||||||
{
|
{
|
||||||
struct driver_data *drv_data = platform_get_drvdata(pdev);
|
struct driver_data *drv_data = dev_get_drvdata(dev);
|
||||||
struct ssp_device *ssp = drv_data->ssp;
|
struct ssp_device *ssp = drv_data->ssp;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
|
@ -1684,9 +1683,9 @@ static int pxa2xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pxa2xx_spi_resume(struct platform_device *pdev)
|
static int pxa2xx_spi_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct driver_data *drv_data = platform_get_drvdata(pdev);
|
struct driver_data *drv_data = dev_get_drvdata(dev);
|
||||||
struct ssp_device *ssp = drv_data->ssp;
|
struct ssp_device *ssp = drv_data->ssp;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
|
@ -1703,26 +1702,29 @@ static int pxa2xx_spi_resume(struct platform_device *pdev)
|
||||||
/* Start the queue running */
|
/* Start the queue running */
|
||||||
status = start_queue(drv_data);
|
status = start_queue(drv_data);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
dev_err(&pdev->dev, "problem starting queue (%d)\n", status);
|
dev_err(dev, "problem starting queue (%d)\n", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define pxa2xx_spi_suspend NULL
|
static struct dev_pm_ops pxa2xx_spi_pm_ops = {
|
||||||
#define pxa2xx_spi_resume NULL
|
.suspend = pxa2xx_spi_suspend,
|
||||||
#endif /* CONFIG_PM */
|
.resume = pxa2xx_spi_resume,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct platform_driver driver = {
|
static struct platform_driver driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "pxa2xx-spi",
|
.name = "pxa2xx-spi",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
.pm = &pxa2xx_spi_pm_ops,
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
.remove = pxa2xx_spi_remove,
|
.remove = pxa2xx_spi_remove,
|
||||||
.shutdown = pxa2xx_spi_shutdown,
|
.shutdown = pxa2xx_spi_shutdown,
|
||||||
.suspend = pxa2xx_spi_suspend,
|
|
||||||
.resume = pxa2xx_spi_resume,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init pxa2xx_spi_init(void)
|
static int __init pxa2xx_spi_init(void)
|
||||||
|
|
Loading…
Reference in New Issue