]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite5af33681299ded8bf2c311eeeefdacbc24feb3c
treea8bb711b72bc12da3f4b22f3a86e502c20209b1a
parentaf0c316569e72a0cfbc80e20b934d00921d10833
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