• Arnd Bergmann's avatar
    net: ti: cpsw: include gpio/consumer.h · e2b3e493
    Arnd Bergmann authored
    On platforms that don't always enable CONFIG_GPIOLIB, we run into
    a build failure:
    
    drivers/net/ethernet/ti/cpsw.c: In function 'cpsw_probe':
    drivers/net/ethernet/ti/cpsw.c:3006:9: error: implicit declaration of function 'devm_gpiod_get_array_optional' [-Werror=implicit-function-declaration]
      mode = devm_gpiod_get_array_optional(&pdev->dev, "mode", GPIOD_OUT_LOW);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/net/ethernet/ti/cpsw.c:3006:59: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
      mode = devm_gpiod_get_array_optional(&pdev->dev, "mode", GPIOD_OUT_LOW);
    
    Since we cannot rely on this to be visible from gpio.h, we have to include
    gpio/consumer.h directly.
    
    Fixes: 2652113f ("net: ethernet: ti: Allow most drivers with COMPILE_TEST")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e2b3e493
cpsw.c 88.7 KB