[PATCH 59/75] header: Add DEVICE_ATTR_ADMIN_RO

Hauke Mehrtens <[email protected]> Fri, 28 Jun 2024 01:47:45 +0200
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
DEVICE_ATTR_ADMIN_RO is used by ipw2x00 driver.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 backport/backport-include/linux/device.h | 5 +++++
 1 file changed, 5 insertions(+)

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_ */
-- 
2.45.2