mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-10 00:17:18 +00:00
usb: gadget: pch_udc: Remove CONFIG_PM_SLEEP ifdefery
Use __maybe_unused for the suspend()/resume() hooks and get rid of the CONFIG_PM_SLEEP ifdefery to improve the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210325135508.70350-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
de620c3b59
commit
cc62ff3e6a
@ -3026,8 +3026,7 @@ static void pch_udc_remove(struct pci_dev *pdev)
|
|||||||
pch_udc_exit(dev);
|
pch_udc_exit(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
static int __maybe_unused pch_udc_suspend(struct device *d)
|
||||||
static int pch_udc_suspend(struct device *d)
|
|
||||||
{
|
{
|
||||||
struct pch_udc_dev *dev = dev_get_drvdata(d);
|
struct pch_udc_dev *dev = dev_get_drvdata(d);
|
||||||
|
|
||||||
@ -3037,16 +3036,12 @@ static int pch_udc_suspend(struct device *d)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pch_udc_resume(struct device *d)
|
static int __maybe_unused pch_udc_resume(struct device *d)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SIMPLE_DEV_PM_OPS(pch_udc_pm, pch_udc_suspend, pch_udc_resume);
|
static SIMPLE_DEV_PM_OPS(pch_udc_pm, pch_udc_suspend, pch_udc_resume);
|
||||||
#define PCH_UDC_PM_OPS (&pch_udc_pm)
|
|
||||||
#else
|
|
||||||
#define PCH_UDC_PM_OPS NULL
|
|
||||||
#endif /* CONFIG_PM_SLEEP */
|
|
||||||
|
|
||||||
static int pch_udc_probe(struct pci_dev *pdev,
|
static int pch_udc_probe(struct pci_dev *pdev,
|
||||||
const struct pci_device_id *id)
|
const struct pci_device_id *id)
|
||||||
@ -3156,7 +3151,7 @@ static struct pci_driver pch_udc_driver = {
|
|||||||
.remove = pch_udc_remove,
|
.remove = pch_udc_remove,
|
||||||
.shutdown = pch_udc_shutdown,
|
.shutdown = pch_udc_shutdown,
|
||||||
.driver = {
|
.driver = {
|
||||||
.pm = PCH_UDC_PM_OPS,
|
.pm = &pch_udc_pm,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user