diff mbox series

[59/75] header: Add DEVICE_ATTR_ADMIN_RO

Message ID 20240627234808.1253337-60-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:47 p.m. UTC
DEVICE_ATTR_ADMIN_RO is used by ipw2x00 driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/device.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h
index 46f2190b..06595285 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -7,4 +7,9 @@ 
 	struct device_attribute dev_attr_##_name = __ATTR_RW_MODE(_name, 0600)
 #endif
 
+#ifndef DEVICE_ATTR_ADMIN_RO
+#define DEVICE_ATTR_ADMIN_RO(_name) \
+	struct device_attribute dev_attr_##_name = __ATTR_RO_MODE(_name, 0400)
+#endif
+
 #endif /* __BACKPORT_DEVICE_H_ */