--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -78,6 +78,14 @@ struct attribute_group {
 	.show	= _name##_show,					\
 }
 
+#define __ATTR_WO(_name) {                                              \
+	.attr   = { .name = __stringify(_name), .mode = S_IWUSR },      \
+	.store  = _name##_store,                                        \
+}
+
+#define __ATTR_RW(_name) __ATTR(_name, (S_IWUSR | S_IRUGO),             \
+				_name##_show, _name##_store)
+
 #define __ATTR_NULL { .attr = { .name = NULL } }
 
 #define ATTRIBUTE_GROUPS(name)					\
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 7faf933..cbbbbe3 100644
