mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
ANDROID: GKI: driver core: Add dev_has_sync_state()
Add an API to check if a device has sync_state support in its driver or bus. Bug: 144066914 Signed-off-by: Saravana Kannan <saravanak@google.com> Change-Id: I86b7d241512a366909645736a0b5abc51a11a5bd
This commit is contained in:
parent
680425be35
commit
82e8a5fba7
1 changed files with 11 additions and 0 deletions
|
|
@ -1518,6 +1518,17 @@ static inline struct device_node *dev_of_node(struct device *dev)
|
|||
return dev->of_node;
|
||||
}
|
||||
|
||||
static inline bool dev_has_sync_state(struct device *dev)
|
||||
{
|
||||
if (!dev)
|
||||
return false;
|
||||
if (dev->driver && dev->driver->sync_state)
|
||||
return true;
|
||||
if (dev->bus && dev->bus->sync_state)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void driver_init(void);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue