diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2014-11-27 16:54:19 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-27 17:12:40 +0100 |
commit | 802abe8434682ba70a0da93269959941eece5aab (patch) | |
tree | 74305cadda58cd49651aea6c927a253b7a58d6d6 /arch/arm/mach-imx/ocotp.c | |
parent | cdb0d02b87b1138567b4eb626d7b6aa433fe3f02 (diff) | |
download | barebox-802abe8434682ba70a0da93269959941eece5aab.tar.gz barebox-802abe8434682ba70a0da93269959941eece5aab.tar.xz |
arm: imx: iim/ocotp: fix link error when !CONFIG_NET
Don't try to attach mac to device if there is no net support selected.
Fixes:
undefined reference to `dev_add_param_mac' in both iim and ocotp drivers.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/ocotp.c')
-rw-r--r-- | arch/arm/mach-imx/ocotp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c index 837500fff8..5912d75866 100644 --- a/arch/arm/mach-imx/ocotp.c +++ b/arch/arm/mach-imx/ocotp.c @@ -432,8 +432,10 @@ static int imx_ocotp_probe(struct device_d *dev) NULL, NULL, &priv->permanent_write_enable, NULL); } - dev_add_param_mac(&(priv->dev), "mac_addr", imx_ocotp_set_mac, - imx_ocotp_get_mac, priv->ethaddr, priv); + if (IS_ENABLED(CONFIG_NET)) + dev_add_param_mac(&(priv->dev), "mac_addr", imx_ocotp_set_mac, + imx_ocotp_get_mac, priv->ethaddr, priv); + dev_add_param_bool(&(priv->dev), "sense_enable", NULL, NULL, &priv->sense_enable, priv); return 0; |