aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h8
-rw-r--r--include/linux/sysfs.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index af603a137690..8511d14071b3 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -367,8 +367,12 @@ extern int __must_check device_create_bin_file(struct device *dev,
367 struct bin_attribute *attr); 367 struct bin_attribute *attr);
368extern void device_remove_bin_file(struct device *dev, 368extern void device_remove_bin_file(struct device *dev,
369 struct bin_attribute *attr); 369 struct bin_attribute *attr);
370extern int device_schedule_callback(struct device *dev, 370extern int device_schedule_callback_owner(struct device *dev,
371 void (*func)(struct device *)); 371 void (*func)(struct device *), struct module *owner);
372
373/* This is a macro to avoid include problems with THIS_MODULE */
374#define device_schedule_callback(dev, func) \
375 device_schedule_callback_owner(dev, func, THIS_MODULE)
372 376
373/* device resource management */ 377/* device resource management */
374typedef void (*dr_release_t)(struct device *dev, void *res); 378typedef void (*dr_release_t)(struct device *dev, void *res);
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index fea9a6b3fb7b..7d5d1ec95c2e 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -80,7 +80,7 @@ struct sysfs_ops {
80#ifdef CONFIG_SYSFS 80#ifdef CONFIG_SYSFS
81 81
82extern int sysfs_schedule_callback(struct kobject *kobj, 82extern int sysfs_schedule_callback(struct kobject *kobj,
83 void (*func)(void *), void *data); 83 void (*func)(void *), void *data, struct module *owner);
84 84
85extern int __must_check 85extern int __must_check
86sysfs_create_dir(struct kobject *, struct dentry *); 86sysfs_create_dir(struct kobject *, struct dentry *);
@@ -137,7 +137,7 @@ extern int __must_check sysfs_init(void);
137#else /* CONFIG_SYSFS */ 137#else /* CONFIG_SYSFS */
138 138
139static inline int sysfs_schedule_callback(struct kobject *kobj, 139static inline int sysfs_schedule_callback(struct kobject *kobj,
140 void (*func)(void *), void *data) 140 void (*func)(void *), void *data, struct module *owner)
141{ 141{
142 return -ENOSYS; 142 return -ENOSYS;
143} 143}