diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-02-11 11:05:11 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-09 08:30:28 +0200 |
commit | 79fdb84a6b46f7c129225b57007b63e765747d52 (patch) | |
tree | a76f78ed5e3f3e48ac6365ce687c8e4ef2e7d9fa /include | |
parent | acd643788b6f7d7c26ebdb00a39dba3338ebfcee (diff) | |
download | barebox-79fdb84a6b46f7c129225b57007b63e765747d52.tar.gz barebox-79fdb84a6b46f7c129225b57007b63e765747d52.tar.xz |
net: phy: Add fixed link support
Some network devices, especially when connected to a switch, are
connected via a fixed link. This patch adds support for a fixed phy
configured through device tree.
TODO: Add support for the "speed" and "full-duplex" properties.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 38b0670187..d7b10afbc9 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -251,7 +251,7 @@ struct phy_driver { struct driver_d drv; }; -#define to_phy_driver(d) container_of(d, struct phy_driver, drv) +#define to_phy_driver(d) ((d) ? container_of(d, struct phy_driver, drv) : NULL) #define PHY_ANY_ID "MATCH ANY PHY" #define PHY_ANY_UID 0xffffffff |