| diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c |
| index fdf2b82..99507de 100644 |
| --- a/drivers/net/ethernet/intel/igb/igb_hwmon.c |
| +++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c |
| @@ -176,7 +176,9 @@ int igb_sysfs_init(struct igb_adapter *a |
| { |
| 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; |
| |
| @@ -233,6 +235,7 @@ int igb_sysfs_init(struct igb_adapter *a |
| 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, |
| @@ -245,6 +248,7 @@ int igb_sysfs_init(struct igb_adapter *a |
| goto exit; |
| |
| err: |
| +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0) */ |
| igb_sysfs_del_adapter(adapter); |
| exit: |
| return rc; |