[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    [PATCH 12/13] backports: handle hwmon_device_register_with_groups API calls
From:       Stefan Assmann <sassmann () kpanic ! de>
Date:       2014-05-16 11:21:23
Message-ID: 1400239284-2916-13-git-send-email-sassmann () kpanic ! de
[Download RAW message or body]

The new hwmon_device_register_with_groups API has not been backported yet.
Address this by putting ifdef around the code using the API.

commit 74188cba088192e14cd7fd5433876e8c947bcdd8
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Thu Jul 11 20:00:12 2013 -0700

    hwmon: Provide managed hwmon registration

git describe --contains 74188cba088192e14cd7fd5433876e8c947bcdd8
v3.13-rc1~126^2~30

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
 .../INFO                                           | 13 ++++++++++
 ...gb-devm_hwmon_device_register_with_groups.patch | 30 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/INFO
  create mode 100644 \
patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/igb-devm_hwmon_device_register_with_groups.patch


diff --git a/patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/INFO \
b/patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/INFO
 new file mode 100644
index 0000000..9169f68
--- /dev/null
+++ b/patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/INFO
 @@ -0,0 +1,13 @@
+The new hwmon_device_register_with_groups API has not been backported yet.
+Address this by putting ifdef around the code using the API.
+
+
+commit 74188cba088192e14cd7fd5433876e8c947bcdd8
+Author: Guenter Roeck <linux@roeck-us.net>
+Date:   Thu Jul 11 20:00:12 2013 -0700
+
+    hwmon: Provide managed hwmon registration
+
+git describe --contains 74188cba088192e14cd7fd5433876e8c947bcdd8
+v3.13-rc1~126^2~30
+
diff --git a/patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/igb-devm_hwmon_device_register_with_groups.patch \
b/patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/igb-devm_hwmon_device_register_with_groups.patch
 new file mode 100644
index 0000000..9f4f40e
--- /dev/null
+++ b/patches/collateral-evolutions/network/0041-devm_hwmon_device_register_with_groups/igb-devm_hwmon_device_register_with_groups.patch
 @@ -0,0 +1,30 @@
+diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c \
b/drivers/net/ethernet/intel/igb/igb_hwmon.c +index 2eee9bb..ad08b1f 100644
+--- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
++++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
+@@ -173,7 +173,9 @@ int igb_sysfs_init(struct igb_adapter *adapter)
+ {
+ 	struct hwmon_buff *igb_hwmon;
+ 	struct i2c_client *client;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
+ 	struct device *hwmon_dev;
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) */
+ 	unsigned int i;
+ 	int rc = 0;
+ 
+@@ -230,6 +232,7 @@ int igb_sysfs_init(struct igb_adapter *adapter)
+ 	igb_hwmon->groups[0] = &igb_hwmon->group;
+ 	igb_hwmon->group.attrs = igb_hwmon->attrs;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
+ 	hwmon_dev = devm_hwmon_device_register_with_groups(&adapter->pdev->dev,
+ 							   client->name,
+ 							   igb_hwmon,
+@@ -242,6 +245,7 @@ int igb_sysfs_init(struct igb_adapter *adapter)
+ 	goto exit;
+ 
+ err:
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) */
+ 	igb_sysfs_del_adapter(adapter);
+ exit:
+ 	return rc;
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic