diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-04 15:00:25 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-04 15:00:25 +0200 |
commit | 4e335f640fadda81aff9dd2dc06703961bea2826 (patch) | |
tree | bc9618ea20fdd6328f534488413dadd5530146ce /device.h | |
parent | dca8c7133b1db463f6ae71ccc6d34cd12735daef (diff) |
make device_claim/device_release operate on the device_user instead of the device to avoid refcount bugs
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -124,6 +124,7 @@ enum device_event { struct device_user { struct list_head list; + bool claimed; struct device *dev; void (*cb)(struct device_user *, enum device_event); }; @@ -147,8 +148,8 @@ void device_add_user(struct device_user *dep, struct device *iface); void device_remove_user(struct device_user *dep); void device_set_present(struct device *dev, bool state); -int device_claim(struct device *dev); -void device_release(struct device *dev); +int device_claim(struct device_user *dep); +void device_release(struct device_user *dep); int check_device_state(struct device *dev); static inline void |