diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2020-01-03 02:34:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-06 01:23:48 +0300 |
commit | aa1d54c65d11ab32e72f8122709e9dff4049ce93 (patch) | |
tree | d43e6ae364a675825b8abf8800e9224bf09c932e /drivers/net/dsa/vitesse-vsc73xx-core.c | |
parent | 704a0afb4963a486f604fba1064f9025e2865fc9 (diff) | |
download | linux-aa1d54c65d11ab32e72f8122709e9dff4049ce93.tar.xz |
net: dsa: vsc73xx: Remove dependency on CONFIG_OF
There is no build time dependency on CONFIG_OF, but we do need to make
sure we gate the initialization of the gpio_chip::of_node member with a
proper check on CONFIG_OF_GPIO. This enables the driver to build on
platforms that do not have CONFIG_OF enabled.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/vitesse-vsc73xx-core.c')
-rw-r--r-- | drivers/net/dsa/vitesse-vsc73xx-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index 42c1574d45f2..69fc0110ce04 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -1111,7 +1111,9 @@ static int vsc73xx_gpio_probe(struct vsc73xx *vsc) vsc->gc.ngpio = 4; vsc->gc.owner = THIS_MODULE; vsc->gc.parent = vsc->dev; +#if IS_ENABLED(CONFIG_OF_GPIO) vsc->gc.of_node = vsc->dev->of_node; +#endif vsc->gc.base = -1; vsc->gc.get = vsc73xx_gpio_get; vsc->gc.set = vsc73xx_gpio_set; |