Commit de375aa8 authored by Jerry Ray's avatar Jerry Ray Committed by David S. Miller

dsa: lan9303: write reg only if necessary

As the regmap_write() is over a slow bus that will sleep, we can speed up
the boot-up time a bit by not bothering to clear a bit that is already
clear.
Signed-off-by: default avatarJerry Ray <jerry.ray@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 601f574a
......@@ -915,8 +915,11 @@ static int lan9303_setup(struct dsa_switch *ds)
if (ret)
return (ret);
/* Clear the TURBO Mode bit if it was set. */
if (reg & LAN9303_VIRT_SPECIAL_TURBO) {
reg &= ~LAN9303_VIRT_SPECIAL_TURBO;
regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, reg);
}
ret = lan9303_setup_tagging(chip);
if (ret)
......
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