diff options
author | Marek Vasut <marex@denx.de> | 2019-06-26 01:43:43 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-27 11:00:31 -0700 |
commit | 5ce9676e8b42fbe8030972e5631990545b34e2f3 (patch) | |
tree | f877640d9d5f9d021166d21cdd4dc0859b97558c /drivers/net/dsa/microchip | |
parent | bafea01f65877adc2778a3a58d3268a42a329eec (diff) | |
download | linux-5ce9676e8b42fbe8030972e5631990545b34e2f3.tar.bz2 |
net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call
The indirect function call to dev->dev_ops->get_port_addr() is expensive
especially if called for every single register access, and only returns
the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly
instead.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip')
-rw-r--r-- | drivers/net/dsa/microchip/ksz9477.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index e8b96566abd9..7d209fd9f26f 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -83,7 +83,7 @@ static void ksz_port_cfg(struct ksz_device *dev, int port, int offset, u8 bits, u32 addr; u8 data; - addr = dev->dev_ops->get_port_addr(port, offset); + addr = PORT_CTRL_ADDR(port, offset); ksz_read8(dev, addr, &data); if (set) |