aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 2a9d6ed59579..ce690ea34547 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -427,8 +427,6 @@ struct class_attribute {
427 char *buf); 427 char *buf);
428 ssize_t (*store)(struct class *class, struct class_attribute *attr, 428 ssize_t (*store)(struct class *class, struct class_attribute *attr,
429 const char *buf, size_t count); 429 const char *buf, size_t count);
430 const void *(*namespace)(struct class *class,
431 const struct class_attribute *attr);
432}; 430};
433 431
434#define CLASS_ATTR(_name, _mode, _show, _store) \ 432#define CLASS_ATTR(_name, _mode, _show, _store) \
@@ -438,10 +436,24 @@ struct class_attribute {
438#define CLASS_ATTR_RO(_name) \ 436#define CLASS_ATTR_RO(_name) \
439 struct class_attribute class_attr_##_name = __ATTR_RO(_name) 437 struct class_attribute class_attr_##_name = __ATTR_RO(_name)
440 438
441extern int __must_check class_create_file(struct class *class, 439extern int __must_check class_create_file_ns(struct class *class,
442 const struct class_attribute *attr); 440 const struct class_attribute *attr,
443extern void class_remove_file(struct class *class, 441 const void *ns);
444 const struct class_attribute *attr); 442extern void class_remove_file_ns(struct class *class,
443 const struct class_attribute *attr,
444 const void *ns);
445
446static inline int __must_check class_create_file(struct class *class,
447 const struct class_attribute *attr)
448{
449 return class_create_file_ns(class, attr, NULL);
450}
451
452static inline void class_remove_file(struct class *class,
453 const struct class_attribute *attr)
454{
455 return class_remove_file_ns(class, attr, NULL);
456}
445 457
446/* Simple class attribute that is just a static string */ 458/* Simple class attribute that is just a static string */
447struct class_attribute_string { 459struct class_attribute_string {