mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 17:43:59 +00:00
drivers: base: Helpers for adding device connection descriptions
Introducing helpers for adding and removing multiple device connection descriptions at once. Acked-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
50e4991214
commit
cd7753d371
@ -773,6 +773,30 @@ struct device *device_connection_find(struct device *dev, const char *con_id);
|
|||||||
void device_connection_add(struct device_connection *con);
|
void device_connection_add(struct device_connection *con);
|
||||||
void device_connection_remove(struct device_connection *con);
|
void device_connection_remove(struct device_connection *con);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* device_connections_add - Add multiple device connections at once
|
||||||
|
* @cons: Zero terminated array of device connection descriptors
|
||||||
|
*/
|
||||||
|
static inline void device_connections_add(struct device_connection *cons)
|
||||||
|
{
|
||||||
|
struct device_connection *c;
|
||||||
|
|
||||||
|
for (c = cons; c->endpoint[0]; c++)
|
||||||
|
device_connection_add(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* device_connections_remove - Remove multiple device connections at once
|
||||||
|
* @cons: Zero terminated array of device connection descriptors
|
||||||
|
*/
|
||||||
|
static inline void device_connections_remove(struct device_connection *cons)
|
||||||
|
{
|
||||||
|
struct device_connection *c;
|
||||||
|
|
||||||
|
for (c = cons; c->endpoint[0]; c++)
|
||||||
|
device_connection_remove(c);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum device_link_state - Device link states.
|
* enum device_link_state - Device link states.
|
||||||
* @DL_STATE_NONE: The presence of the drivers is not being tracked.
|
* @DL_STATE_NONE: The presence of the drivers is not being tracked.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user