summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index a100e609..46d6c0e6 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -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