From 79fdb84a6b46f7c129225b57007b63e765747d52 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 11 Feb 2016 11:05:11 +0100 Subject: 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 Tested-by: Wjatscheslaw Stoljarski --- include/linux/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3