]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: core: use genphy version of callbacks read_status and config_aneg per default
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 30 Nov 2017 22:46:19 +0000 (23:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Dec 2017 20:42:21 +0000 (15:42 -0500)
commit56e2ea0949de1053f4de6143e095b7f89788cbb9
treeba2f3b655ba0124d0a873881b9f7e918b6280056
parentb3e7159e2869520472d805afaa7b7775c2c17649
net: phy: core: use genphy version of callbacks read_status and config_aneg per default

read_status and config_aneg are the only mandatory callbacks and most
of the time the generic implementation is used by drivers.
So make the core fall back to the generic version if a driver doesn't
implement the respective callback.

Also currently the core doesn't seem to verify that drivers implement
the mandatory calls. If a driver doesn't do so we'd just get a NPE.
With this patch this potential issue doesn't exit any longer.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
include/linux/phy.h