hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/net/phy/fixed_phy.c
....@@ -23,7 +23,6 @@
2323 #include <linux/slab.h>
2424 #include <linux/of.h>
2525 #include <linux/gpio.h>
26
-#include <linux/seqlock.h>
2726 #include <linux/idr.h>
2827
2928 #include "swphy.h"
....@@ -36,7 +35,6 @@
3635 struct fixed_phy {
3736 int addr;
3837 struct phy_device *phydev;
39
- seqcount_t seqcount;
4038 struct fixed_phy_status status;
4139 int (*link_update)(struct net_device *, struct fixed_phy_status *);
4240 struct list_head node;
....@@ -62,18 +60,15 @@
6260 list_for_each_entry(fp, &fmb->phys, node) {
6361 if (fp->addr == phy_addr) {
6462 struct fixed_phy_status state;
65
- int s;
6663
67
- do {
68
- s = read_seqcount_begin(&fp->seqcount);
69
- /* Issue callback if user registered it. */
70
- if (fp->link_update)
71
- fp->link_update(fp->phydev->attached_dev,
72
- &fp->status);
73
- /* Check the GPIO for change in status */
74
- fixed_phy_update(fp);
75
- state = fp->status;
76
- } while (read_seqcount_retry(&fp->seqcount, s));
64
+ /* Issue callback if user registered it. */
65
+ if (fp->link_update)
66
+ fp->link_update(fp->phydev->attached_dev,
67
+ &fp->status);
68
+
69
+ /* Check the GPIO for change in status */
70
+ fixed_phy_update(fp);
71
+ state = fp->status;
7772
7873 return swphy_read_reg(reg_num, &state);
7974 }
....@@ -130,8 +125,6 @@
130125 fp = kzalloc(sizeof(*fp), GFP_KERNEL);
131126 if (!fp)
132127 return -ENOMEM;
133
-
134
- seqcount_init(&fp->seqcount);
135128
136129 if (irq != PHY_POLL)
137130 fmb->mii_bus->irq[phy_addr] = irq;