From 52409fae3e4b8d16b68b61902fc09075cd97b75d Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Sun, 2 Jul 2017 16:41:37 +0200 Subject: Backports generated from 4.11 kernel Initial commit. Signed-off-by: Dominik Sliwa --- backport-include/linux/hwmon.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 backport-include/linux/hwmon.h (limited to 'backport-include/linux/hwmon.h') diff --git a/backport-include/linux/hwmon.h b/backport-include/linux/hwmon.h new file mode 100644 index 0000000..3b61b26 --- /dev/null +++ b/backport-include/linux/hwmon.h @@ -0,0 +1,34 @@ +#ifndef __BACKPORT_LINUX_HWMON_H +#define __BACKPORT_LINUX_HWMON_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(3,13,0) +/* + * Backports + * + * commit bab2243ce1897865e31ea6d59b0478391f51812b + * Author: Guenter Roeck + * Date: Sat Jul 6 13:57:23 2013 -0700 + * + * hwmon: Introduce hwmon_device_register_with_groups + * + * hwmon_device_register_with_groups() lets callers register a hwmon device + * together with all sysfs attributes in a single call. + * + * When using hwmon_device_register_with_groups(), hwmon attributes are attached + * to the hwmon device directly and no longer with its parent device. + * + * Signed-off-by: Guenter Roeck + */ +struct device * +hwmon_device_register_with_groups(struct device *dev, const char *name, + void *drvdata, + const struct attribute_group **groups); +struct device * +devm_hwmon_device_register_with_groups(struct device *dev, const char *name, + void *drvdata, + const struct attribute_group **groups); +#endif /* LINUX_VERSION_IS_LESS(3,13,0) */ + +#endif /* __BACKPORT_LINUX_HWMON_H */ -- cgit v1.2.3