mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
greybus: connection: add functions to get/set private data
Add gb_connection_get_data() and gb_connection_set_data() to get and set the private data of a connection, instead of "open coding" it everywhere. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
30b442b385
commit
418f3dab84
1 changed files with 11 additions and 0 deletions
|
@ -88,4 +88,15 @@ static inline bool gb_connection_e2efc_enabled(struct gb_connection *connection)
|
||||||
return !(connection->flags & GB_CONNECTION_FLAG_CSD);
|
return !(connection->flags & GB_CONNECTION_FLAG_CSD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void *gb_connection_get_data(struct gb_connection *connection)
|
||||||
|
{
|
||||||
|
return connection->private;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void gb_connection_set_data(struct gb_connection *connection,
|
||||||
|
void *data)
|
||||||
|
{
|
||||||
|
connection->private = data;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __CONNECTION_H */
|
#endif /* __CONNECTION_H */
|
||||||
|
|
Loading…
Reference in a new issue