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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user