[PATCH 65/75] header Add SENSOR_DEVICE_ATTR_RO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These new attributes are used by the mt76 driver.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/hwmon-sysfs.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 backport/backport-include/linux/hwmon-sysfs.h

diff --git a/backport/backport-include/linux/hwmon-sysfs.h b/backport/backport-include/linux/hwmon-sysfs.h
new file mode 100644
index 00000000..84a4e149
--- /dev/null
+++ b/backport/backport-include/linux/hwmon-sysfs.h
@@ -0,0 +1,15 @@
+#ifndef __BACKPORT_LINUX_HWMON_SYSFS_H
+#define __BACKPORT_LINUX_HWMON_SYSFS_H
+#include_next <linux/hwmon-sysfs.h>
+
+#ifndef SENSOR_DEVICE_ATTR_RO
+#define SENSOR_DEVICE_ATTR_RO(_name, _func, _index)		\
+	SENSOR_DEVICE_ATTR(_name, 0444, _func##_show, NULL, _index)
+#endif
+
+#ifndef SENSOR_DEVICE_ATTR_RW
+#define SENSOR_DEVICE_ATTR_RW(_name, _func, _index)		\
+	SENSOR_DEVICE_ATTR(_name, 0644, _func##_show, _func##_store, _index)
+#endif
+
+#endif /* __BACKPORT_LINUX_HWMON_SYSFS_H */
-- 
2.45.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux