]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/device.h
memcg, slab: do not destroy children caches if parent has aliases
[karo-tx-linux.git] / include / linux / device.h
index fb1ba13f7665419c5e6c755db46c7cc60e8b38dd..233bbbeb768d6f8c5a6aa32411675a14b3401272 100644 (file)
@@ -566,6 +566,12 @@ extern int __must_check device_create_bin_file(struct device *dev,
                                        const struct bin_attribute *attr);
 extern void device_remove_bin_file(struct device *dev,
                                   const struct bin_attribute *attr);
+extern int device_schedule_callback_owner(struct device *dev,
+               void (*func)(struct device *dev), struct module *owner);
+
+/* This is a macro to avoid include problems with THIS_MODULE */
+#define device_schedule_callback(dev, func)                    \
+       device_schedule_callback_owner(dev, func, THIS_MODULE)
 
 /* device resource management */
 typedef void (*dr_release_t)(struct device *dev, void *res);
@@ -622,6 +628,7 @@ static inline void *devm_kcalloc(struct device *dev,
        return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO);
 }
 extern void devm_kfree(struct device *dev, void *p);
+extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp);
 
 void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
 void __iomem *devm_request_and_ioremap(struct device *dev,
@@ -925,7 +932,10 @@ extern int device_online(struct device *dev);
 extern struct device *__root_device_register(const char *name,
                                             struct module *owner);
 
-/* This is a macro to avoid include problems with THIS_MODULE */
+/*
+ * This is a macro to avoid include problems with THIS_MODULE,
+ * just as per what is done for device_schedule_callback() above.
+ */
 #define root_device_register(name) \
        __root_device_register(name, THIS_MODULE)