mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
firewire: add parent-of-unit accessor
Retrieval of an fw_unit's parent is a common pattern in high-level code. Wrap it up as device = fw_parent_device(unit). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
parent
e71d31da06
commit
e5110d011e
3 changed files with 28 additions and 18 deletions
|
@ -248,6 +248,11 @@ static inline void fw_unit_put(struct fw_unit *unit)
|
|||
put_device(&unit->device);
|
||||
}
|
||||
|
||||
static inline struct fw_device *fw_parent_device(struct fw_unit *unit)
|
||||
{
|
||||
return fw_device(unit->device.parent);
|
||||
}
|
||||
|
||||
struct ieee1394_device_id;
|
||||
|
||||
struct fw_driver {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue