net: phy: reset the PHY even if probe() is not implemented
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 26 Jun 2020 15:53:24 +0000 (17:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jun 2020 20:40:09 +0000 (13:40 -0700)
commit1dba6995731e1c1a8ea167aea74c0a917b437e6c
treea8bb711b72bc12da3f4b22f3a86e502c20209b1a
parent333740981f94fa80326cc8e5d2da105f17bc1dd5
net: phy: reset the PHY even if probe() is not implemented

Currently we only call phy_device_reset() if the PHY driver implements
the probe() callback. This is not mandatory and many drivers (e.g.
realtek) don't need probe() for most devices but still can have reset
GPIOs defined. There's no reason to depend on the presence of probe()
here so pull the reset code out of the if clause.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c