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
53894b0275
commit
3bcfe0980f
1 changed files with 11 additions and 0 deletions
|
|
@ -1520,6 +1520,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…
Add table
Add a link
Reference in a new issue