Commit 673b196f authored by Arun Ramadoss's avatar Arun Ramadoss Committed by David S. Miller

net: dsa: microchip: rename shutdown to reset in ksz_dev_ops

This patch renames the shutdown to reset in ksz_dev_ops in order to use
the reset dev_ops in the ksz_setup.
Signed-off-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d99ec3a
......@@ -1379,7 +1379,7 @@ static int ksz8_setup(struct dsa_switch *ds)
if (!dev->vlan_cache)
return -ENOMEM;
ret = ksz8_reset_switch(dev);
ret = dev->dev_ops->reset(dev);
if (ret) {
dev_err(ds->dev, "failed to reset switch\n");
return ret;
......@@ -1545,7 +1545,7 @@ static const struct ksz_dev_ops ksz8_dev_ops = {
.mirror_add = ksz8_port_mirror_add,
.mirror_del = ksz8_port_mirror_del,
.get_caps = ksz8_get_caps,
.shutdown = ksz8_reset_switch,
.reset = ksz8_reset_switch,
.init = ksz8_switch_init,
.exit = ksz8_switch_exit,
};
......
......@@ -110,8 +110,8 @@ static void ksz8795_spi_shutdown(struct spi_device *spi)
if (!dev)
return;
if (dev->dev_ops->shutdown)
dev->dev_ops->shutdown(dev);
if (dev->dev_ops->reset)
dev->dev_ops->reset(dev);
dsa_switch_shutdown(dev->ds);
......
......@@ -1246,7 +1246,7 @@ static int ksz9477_setup(struct dsa_switch *ds)
if (!dev->vlan_cache)
return -ENOMEM;
ret = ksz9477_reset_switch(dev);
ret = dev->dev_ops->reset(dev);
if (ret) {
dev_err(ds->dev, "failed to reset switch\n");
return ret;
......@@ -1400,7 +1400,7 @@ static const struct ksz_dev_ops ksz9477_dev_ops = {
.mdb_del = ksz9477_mdb_del,
.change_mtu = ksz9477_change_mtu,
.max_mtu = ksz9477_max_mtu,
.shutdown = ksz9477_reset_switch,
.reset = ksz9477_reset_switch,
.init = ksz9477_switch_init,
.exit = ksz9477_switch_exit,
};
......
......@@ -71,8 +71,8 @@ static void ksz9477_i2c_shutdown(struct i2c_client *i2c)
if (!dev)
return;
if (dev->dev_ops->shutdown)
dev->dev_ops->shutdown(dev);
if (dev->dev_ops->reset)
dev->dev_ops->reset(dev);
dsa_switch_shutdown(dev->ds);
......
......@@ -204,7 +204,7 @@ struct ksz_dev_ops {
int (*max_mtu)(struct ksz_device *dev, int port);
void (*freeze_mib)(struct ksz_device *dev, int port, bool freeze);
void (*port_init_cnt)(struct ksz_device *dev, int port);
int (*shutdown)(struct ksz_device *dev);
int (*reset)(struct ksz_device *dev);
int (*init)(struct ksz_device *dev);
void (*exit)(struct ksz_device *dev);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment