add __ATTR
authorDave Airlie <airlied@linux.ie>
Sun, 25 Sep 2005 05:19:06 +0000 (05:19 +0000)
committerDave Airlie <airlied@linux.ie>
Sun, 25 Sep 2005 05:19:06 +0000 (05:19 +0000)
linux-core/drm_compat.h

index a100e60..46d6c0e 100644 (file)
@@ -200,4 +200,13 @@ static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long from
 #define pci_pretty_name(dev) ""
 #endif
 
+/* sysfs __ATTR macro */
+#ifndef __ATTR
+#define __ATTR(_name,_mode,_show,_store) { \
+        .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE },     \
+        .show   = _show,                                        \
+        .store  = _store,                                       \
+}
+#endif
+
 #endif