|
16 | 16 | #include <linux/clk.h>
|
17 | 17 | #include <linux/delay.h>
|
18 | 18 | #include <linux/ethtool.h>
|
19 |
| -#include <linux/hwmon.h> |
20 | 19 | #include <linux/phy.h>
|
21 | 20 | #include <linux/if_vlan.h>
|
22 | 21 | #include <linux/in.h>
|
@@ -5347,43 +5346,6 @@ static bool rtl_aspm_is_safe(struct rtl8169_private *tp)
|
5347 | 5346 | return false;
|
5348 | 5347 | }
|
5349 | 5348 |
|
5350 |
| -static umode_t r8169_hwmon_is_visible(const void *drvdata, |
5351 |
| - enum hwmon_sensor_types type, |
5352 |
| - u32 attr, int channel) |
5353 |
| -{ |
5354 |
| - return 0444; |
5355 |
| -} |
5356 |
| - |
5357 |
| -static int r8169_hwmon_read(struct device *dev, enum hwmon_sensor_types type, |
5358 |
| - u32 attr, int channel, long *val) |
5359 |
| -{ |
5360 |
| - struct rtl8169_private *tp = dev_get_drvdata(dev); |
5361 |
| - int val_raw; |
5362 |
| - |
5363 |
| - val_raw = phy_read_paged(tp->phydev, 0xbd8, 0x12) & 0x3ff; |
5364 |
| - if (val_raw >= 512) |
5365 |
| - val_raw -= 1024; |
5366 |
| - |
5367 |
| - *val = 1000 * val_raw / 2; |
5368 |
| - |
5369 |
| - return 0; |
5370 |
| -} |
5371 |
| - |
5372 |
| -static const struct hwmon_ops r8169_hwmon_ops = { |
5373 |
| - .is_visible = r8169_hwmon_is_visible, |
5374 |
| - .read = r8169_hwmon_read, |
5375 |
| -}; |
5376 |
| - |
5377 |
| -static const struct hwmon_channel_info * const r8169_hwmon_info[] = { |
5378 |
| - HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), |
5379 |
| - NULL |
5380 |
| -}; |
5381 |
| - |
5382 |
| -static const struct hwmon_chip_info r8169_hwmon_chip_info = { |
5383 |
| - .ops = &r8169_hwmon_ops, |
5384 |
| - .info = r8169_hwmon_info, |
5385 |
| -}; |
5386 |
| - |
5387 | 5349 | static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
5388 | 5350 | {
|
5389 | 5351 | struct rtl8169_private *tp;
|
@@ -5563,12 +5525,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
5563 | 5525 | if (rc)
|
5564 | 5526 | return rc;
|
5565 | 5527 |
|
5566 |
| - /* The temperature sensor is available from RTl8125B */ |
5567 |
| - if (IS_REACHABLE(CONFIG_HWMON) && tp->mac_version >= RTL_GIGA_MAC_VER_63) |
5568 |
| - /* ignore errors */ |
5569 |
| - devm_hwmon_device_register_with_info(&pdev->dev, "nic_temp", tp, |
5570 |
| - &r8169_hwmon_chip_info, |
5571 |
| - NULL); |
5572 | 5528 | rc = register_netdev(dev);
|
5573 | 5529 | if (rc)
|
5574 | 5530 | return rc;
|
|
0 commit comments