]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Revert "net: dsa: microchip: set the correct number of ports"
authorSasha Levin <sashal@kernel.org>
Mon, 7 Sep 2020 18:28:39 +0000 (14:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:12:32 +0000 (19:12 +0200)
This reverts commit d55dad8b1d893fae0c4e778abf2ace048bcbad86.

Upstream commit af199a1a9cb0 ("net: dsa: microchip: set the correct
number of ports") seems to have been applied twice on top of the 5.4
branch. This revert the second instance of said commit.

Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz9477.c

index 8d50aacd19e5126ddce83b0af31857f1753d3a62..84c4319e3b31f1e38aed496df71bbc76650a6dd4 100644 (file)
@@ -1270,9 +1270,6 @@ static int ksz8795_switch_init(struct ksz_device *dev)
        /* set the real number of ports */
        dev->ds->num_ports = dev->port_cnt;
 
-       /* set the real number of ports */
-       dev->ds->num_ports = dev->port_cnt;
-
        return 0;
 }
 
index b15da9a8e3bb9782ac0ea0d6a5526be78e15f909..49ab1346dc3f75d6661721a199412a9199df592b 100644 (file)
@@ -515,9 +515,6 @@ static int ksz9477_port_vlan_filtering(struct dsa_switch *ds, int port,
                             PORT_VLAN_LOOKUP_VID_0, false);
        }
 
-       /* set the real number of ports */
-       dev->ds->num_ports = dev->port_cnt;
-
        return 0;
 }