Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88823492 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville
Browse files

p54pci: use SIMPLE_DEV_PM_OPS



p54pci does not provide any runtime pm callbacks, so support for
PM_RUNTIME is not needed and we could go to PM_SLEEP.
This also makes it possible to use SIMPLE_DEV_PM_OPS instead of
manually filling struct dev_pm_ops.

Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 88427588
Loading
Loading
Loading
Loading
+3 −10
Original line number Original line Diff line number Diff line
@@ -659,7 +659,7 @@ static void __devexit p54p_remove(struct pci_dev *pdev)
	p54_free_common(dev);
	p54_free_common(dev);
}
}


#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int p54p_suspend(struct device *device)
static int p54p_suspend(struct device *device)
{
{
	struct pci_dev *pdev = to_pci_dev(device);
	struct pci_dev *pdev = to_pci_dev(device);
@@ -681,19 +681,12 @@ static int p54p_resume(struct device *device)
	return pci_set_power_state(pdev, PCI_D0);
	return pci_set_power_state(pdev, PCI_D0);
}
}


static const struct dev_pm_ops p54pci_pm_ops = {
static SIMPLE_DEV_PM_OPS(p54pci_pm_ops, p54p_suspend, p54p_resume);
	.suspend = p54p_suspend,
	.resume = p54p_resume,
	.freeze = p54p_suspend,
	.thaw = p54p_resume,
	.poweroff = p54p_suspend,
	.restore = p54p_resume,
};


#define P54P_PM_OPS (&p54pci_pm_ops)
#define P54P_PM_OPS (&p54pci_pm_ops)
#else
#else
#define P54P_PM_OPS (NULL)
#define P54P_PM_OPS (NULL)
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */


static struct pci_driver p54p_driver = {
static struct pci_driver p54p_driver = {
	.name		= "p54pci",
	.name		= "p54pci",