net: dsa: lan9303: make lan9303_handle_reset() a void function
lan9303_handle_reset never returns anything other than success. So there's not need for it to return an error code. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9f239fe6a6
commit
a57d476d97
drivers/net/dsa
|
@ -817,18 +817,16 @@ static void lan9303_bridge_ports(struct lan9303 *chip)
|
||||||
lan9303_alr_add_port(chip, eth_stp_addr, 0, true);
|
lan9303_alr_add_port(chip, eth_stp_addr, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lan9303_handle_reset(struct lan9303 *chip)
|
static void lan9303_handle_reset(struct lan9303 *chip)
|
||||||
{
|
{
|
||||||
if (!chip->reset_gpio)
|
if (!chip->reset_gpio)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
if (chip->reset_duration != 0)
|
if (chip->reset_duration != 0)
|
||||||
msleep(chip->reset_duration);
|
msleep(chip->reset_duration);
|
||||||
|
|
||||||
/* release (deassert) reset and activate the device */
|
/* release (deassert) reset and activate the device */
|
||||||
gpiod_set_value_cansleep(chip->reset_gpio, 0);
|
gpiod_set_value_cansleep(chip->reset_gpio, 0);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stop processing packets for all ports */
|
/* stop processing packets for all ports */
|
||||||
|
@ -1328,9 +1326,7 @@ int lan9303_probe(struct lan9303 *chip, struct device_node *np)
|
||||||
|
|
||||||
lan9303_probe_reset_gpio(chip, np);
|
lan9303_probe_reset_gpio(chip, np);
|
||||||
|
|
||||||
ret = lan9303_handle_reset(chip);
|
lan9303_handle_reset(chip);
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = lan9303_check_device(chip);
|
ret = lan9303_check_device(chip);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in New Issue