mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
firewire: move fw_device reference counting from drivers to core
fw_unit device drivers invariably need to talk to the fw_unit's parent (an fw_device) and grandparent (an fw_card). firewire-core already maintains an fw_card reference for the entire lifetime of an fw_device. Likewise, let firewire-core maintain an fw_device reference for the entire lifetime of an fw_unit so that fw_unit drivers don't have to. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
parent
2ca526bf49
commit
2107622684
5 changed files with 16 additions and 19 deletions
|
@ -203,18 +203,6 @@ static inline int fw_device_is_shutdown(struct fw_device *device)
|
|||
return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN;
|
||||
}
|
||||
|
||||
static inline struct fw_device *fw_device_get(struct fw_device *device)
|
||||
{
|
||||
get_device(&device->device);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
static inline void fw_device_put(struct fw_device *device)
|
||||
{
|
||||
put_device(&device->device);
|
||||
}
|
||||
|
||||
int fw_device_enable_phys_dma(struct fw_device *device);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue