Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166106
b: refs/heads/master
c: 86d2593
h: refs/heads/master
v: v3
  • Loading branch information
Mike Rapoport authored and Eric Miao committed Sep 10, 2009
1 parent 37f73b3 commit aac2758
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7f3f59b48112ba5ba1c1ffc093f02654e0ce97e
refs/heads/master: 86d2593afeb94eed82a4eecd7aae2f26766d61b6
30 changes: 16 additions & 14 deletions trunk/drivers/spi/pxa2xx_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1668,10 +1668,9 @@ static void pxa2xx_spi_shutdown(struct platform_device *pdev)
}

#ifdef CONFIG_PM

static int pxa2xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
static int pxa2xx_spi_suspend(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;
int status = 0;

Expand All @@ -1684,9 +1683,9 @@ static int pxa2xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
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;
int status = 0;

Expand All @@ -1703,26 +1702,29 @@ static int pxa2xx_spi_resume(struct platform_device *pdev)
/* Start the queue running */
status = start_queue(drv_data);
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 0;
}
#else
#define pxa2xx_spi_suspend NULL
#define pxa2xx_spi_resume NULL
#endif /* CONFIG_PM */

static struct dev_pm_ops pxa2xx_spi_pm_ops = {
.suspend = pxa2xx_spi_suspend,
.resume = pxa2xx_spi_resume,
};
#endif

static struct platform_driver driver = {
.driver = {
.name = "pxa2xx-spi",
.owner = THIS_MODULE,
.name = "pxa2xx-spi",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &pxa2xx_spi_pm_ops,
#endif
},
.remove = pxa2xx_spi_remove,
.shutdown = pxa2xx_spi_shutdown,
.suspend = pxa2xx_spi_suspend,
.resume = pxa2xx_spi_resume,
};

static int __init pxa2xx_spi_init(void)
Expand Down

0 comments on commit aac2758

Please sign in to comment.