On Tue, Aug 13, 2013 at 10:23 PM, Fabio Estevam <festevam@xxxxxxxxx> wrote: > On Tue, Aug 13, 2013 at 11:05 AM, Peter Chen <hzpeterchen@xxxxxxxxx> wrote: > >> But what I see is the &dwc3_pci_dev_pm_ops is not NULL if CONFIG_PM_SLEEP >> is not defined. > > The point of this macro is that we do not need to provide the .suspend > and .resume NULL version when !CONFIG_PM_SLEEP because the macro takes > care of this for us: > > #ifdef CONFIG_PM_SLEEP > #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ > .suspend = suspend_fn, \ > .resume = resume_fn, \ > .freeze = suspend_fn, \ > .thaw = resume_fn, \ > .poweroff = suspend_fn, \ > .restore = resume_fn, > #else > #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) > #endif No, it is not relationship with my point. Let's see the code: static struct pci_driver dwc3_pci_driver = { .name = "dwc3-pci", @@ -232,7 +227,7 @@ static struct pci_driver dwc3_pci_driver = { .probe = dwc3_pci_probe, .remove = dwc3_pci_remove, .driver = { - .pm = DEV_PM_OPS, + .pm = &dwc3_pci_dev_pm_ops, If CONFIG_PM_SLEEP is not defined, the current value is .pm = NULL, but your version .pm != NULL (its content is NULL). I am not sure if it will cause any problems. -- BR, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html