diff options
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 7075a2485ed3..30c52d70c86d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -683,6 +683,18 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); int devm_add_action(struct device *dev, void (*action)(void *), void *data); void devm_remove_action(struct device *dev, void (*action)(void *), void *data); +static inline int devm_add_action_or_reset(struct device *dev, + void (*action)(void *), void *data) +{ + int ret; + + ret = devm_add_action(dev, action, data); + if (ret) + action(data); + + return ret; +} + struct device_dma_parameters { /* * a low level driver may set these to teach IOMMU code about @@ -817,6 +829,7 @@ struct device { struct cma *cma_area; /* contiguous memory area for dma allocations */ #endif + struct removed_region *removed_mem; /* arch specific additions */ struct dev_archdata archdata; @@ -1012,6 +1025,7 @@ static inline bool device_supports_offline(struct device *dev) extern void lock_device_hotplug(void); extern void unlock_device_hotplug(void); extern int lock_device_hotplug_sysfs(void); +extern void lock_device_hotplug_assert(void); extern int device_offline(struct device *dev); extern int device_online(struct device *dev); extern void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode); |