diff options
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 24 |
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 | ||
441 | extern int __must_check class_create_file(struct class *class, | 439 | extern int __must_check class_create_file_ns(struct class *class, |
442 | const struct class_attribute *attr); | 440 | const struct class_attribute *attr, |
443 | extern void class_remove_file(struct class *class, | 441 | const void *ns); |
444 | const struct class_attribute *attr); | 442 | extern void class_remove_file_ns(struct class *class, |
443 | const struct class_attribute *attr, | ||
444 | const void *ns); | ||
445 | |||
446 | static 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 | |||
452 | static 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 */ |
447 | struct class_attribute_string { | 459 | struct class_attribute_string { |