diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-08-31 22:18:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-01 21:16:37 +0200 |
commit | 5122d4ec9e8053a5944bf77db6bd6c89143531d7 (patch) | |
tree | e9e122b9db18a1a5d1ad133b8806dcd61b4a39cf /drivers/net/dsa/mv88e6xxx/chip.h | |
parent | net: dsa: mv88e6xxx: introduce .serdes_irq_mapping (diff) | |
download | linux-5122d4ec9e8053a5944bf77db6bd6c89143531d7.tar.xz linux-5122d4ec9e8053a5944bf77db6bd6c89143531d7.zip |
net: dsa: mv88e6xxx: simplify .serdes_get_lane
Because the mapping between a SERDES interface and its lane is static,
we don't need to stick with negative error codes actually and we can
simply return 0 if there is no lane, just like the IRQ mapping.
This way we can keep a simple and intuitive API using unsigned lane
numbers while simplifying the implementations with single return
statements. Last but not least, fix the reverse chrismas tree in
mv88e6390x_serdes_get_lane.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h index b116bd7f6109..add0ec5188ec 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -444,7 +444,7 @@ struct mv88e6xxx_ops { int (*serdes_power)(struct mv88e6xxx_chip *chip, int port, bool on); /* SERDES lane mapping */ - int (*serdes_get_lane)(struct mv88e6xxx_chip *chip, int port, u8 *lane); + u8 (*serdes_get_lane)(struct mv88e6xxx_chip *chip, int port); /* SERDES interrupt handling */ unsigned int (*serdes_irq_mapping)(struct mv88e6xxx_chip *chip, |