driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW}
[linux-2.6-microblaze.git] / include / linux / sysfs.h
index 86067db..34e8412 100644 (file)
@@ -123,6 +123,13 @@ struct attribute_group {
        .show   = _name##_show,                                         \
 }
 
+#define __ATTR_RW_MODE(_name, _mode) {                                 \
+       .attr   = { .name = __stringify(_name),                         \
+                   .mode = VERIFY_OCTAL_PERMISSIONS(_mode) },          \
+       .show   = _name##_show,                                         \
+       .store  = _name##_store,                                        \
+}
+
 #define __ATTR_WO(_name) {                                             \
        .attr   = { .name = __stringify(_name), .mode = 0200 },         \
        .store  = _name##_store,                                        \