• YueHaibing's avatar
    PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB · 381ed79c
    YueHaibing authored
    If CONFIG_GPIOLIB is not selected the compilation results in the
    following build errors:
    
    drivers/pci/controller/dwc/pci-dra7xx.c:
     In function dra7xx_pcie_probe:
    drivers/pci/controller/dwc/pci-dra7xx.c:777:10:
     error: implicit declaration of function devm_gpiod_get_optional;
     did you mean devm_regulator_get_optional? [-Werror=implicit-function-declaration]
    
      reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH);
    
    drivers/pci/controller/dwc/pci-dra7xx.c:778:45: error: ‘GPIOD_OUT_HIGH’
    undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
      reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH);
                                                 ^~~~~~~~~~~~~~
                                                 GPIOF_INIT_HIGH
    
    Fix them by including the appropriate header file.
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
    [lorenzo.pieralisi@arm.com: commit log]
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
    381ed79c
pci-dra7xx.c 22.4 KB