summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-09-29 12:21:57 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-30 01:25:59 -0400
commit370b4ffbd8dda2b1a61dc63a5ac3088d8e715d53 (patch)
tree94e29e0aa13072f2d581f6423c90054300a50714 /drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
parentde33376b39b6ea939d53ea44c8c6595b80826501 (diff)
downloadop-kernel-dev-370b4ffbd8dda2b1a61dc63a5ac3088d8e715d53.zip
op-kernel-dev-370b4ffbd8dda2b1a61dc63a5ac3088d8e715d53.tar.gz
net: dsa: mv88e6xxx: add mv88e6xxx_num_ports helper
Add an mv88e6xxx_num_ports helper instead of digging in the chip info structure. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/mv88e6xxx.h')
-rw-r--r--drivers/net/dsa/mv88e6xxx/mv88e6xxx.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
index 20fe6c6..cf639ed 100644
--- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
@@ -737,6 +737,11 @@ static inline unsigned int mv88e6xxx_num_databases(struct mv88e6xxx_chip *chip)
return chip->info->num_databases;
}
+static inline unsigned int mv88e6xxx_num_ports(struct mv88e6xxx_chip *chip)
+{
+ return chip->info->num_ports;
+}
+
int mv88e6xxx_read(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val);
int mv88e6xxx_write(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val);
int mv88e6xxx_update(struct mv88e6xxx_chip *chip, int addr, int reg,
OpenPOWER on IntegriCloud