diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-19 03:20:09 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-19 03:20:09 +0200 |
commit | d16871c7a55370174eb672edee24feade74cd37e (patch) | |
tree | 39995e27e86f9efbf101a8b9f5a23e7d9821bae8 /device.h | |
parent | ccca61c97d460d73f29750abdf38cea20ac440f3 (diff) |
rework device hotplug handling some more, add device_lock/device_unlock to prevent use-after-free bugs
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -100,6 +100,8 @@ struct device_user { struct list_head list; bool claimed; + bool hotplug; + struct device *dev; void (*cb)(struct device_user *, enum device_event); }; @@ -113,6 +115,9 @@ extern const struct config_param_list device_attr_list; extern const struct device_type simple_device_type; extern const struct device_type bridge_device_type; +void device_lock(void); +void device_unlock(void); + struct device *device_create(const char *name, const struct device_type *type, struct blob_attr *config); void device_init_settings(struct device *dev, struct blob_attr **tb); |