Merge branch 'pm-core'
* pm-core: driver core: Avoid NULL pointer dereferences in device_is_bound() platform: Do not detach from PM domains on shutdown USB / PM: Allow USB devices to remain runtime-suspended when sleeping PM / sleep: Go direct_complete if driver has no callbacks PM / Domains: add setter for dev.pm_domain device core: add device_is_bound()
This commit is contained in:
@@ -1044,6 +1044,8 @@ extern int __must_check driver_attach(struct device_driver *drv);
|
||||
extern void device_initial_probe(struct device *dev);
|
||||
extern int __must_check device_reprobe(struct device *dev);
|
||||
|
||||
extern bool device_is_bound(struct device *dev);
|
||||
|
||||
/*
|
||||
* Easy functions for dynamically creating devices on the fly
|
||||
*/
|
||||
|
@@ -573,6 +573,7 @@ struct dev_pm_info {
|
||||
struct wakeup_source *wakeup;
|
||||
bool wakeup_path:1;
|
||||
bool syscore:1;
|
||||
bool no_pm_callbacks:1; /* Owned by the PM core */
|
||||
#else
|
||||
unsigned int should_wakeup:1;
|
||||
#endif
|
||||
|
@@ -240,12 +240,15 @@ static inline int of_genpd_add_provider_onecell(struct device_node *np,
|
||||
#ifdef CONFIG_PM
|
||||
extern int dev_pm_domain_attach(struct device *dev, bool power_on);
|
||||
extern void dev_pm_domain_detach(struct device *dev, bool power_off);
|
||||
extern void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd);
|
||||
#else
|
||||
static inline int dev_pm_domain_attach(struct device *dev, bool power_on)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {}
|
||||
static inline void dev_pm_domain_set(struct device *dev,
|
||||
struct dev_pm_domain *pd) {}
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_PM_DOMAIN_H */
|
||||
|
Reference in New Issue
Block a user