]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mfd: lpc_sch: Rename GPIOBASE to prevent build error
authorRandy Dunlap <rdunlap@infradead.org>
Tue, 7 Sep 2021 00:19:49 +0000 (17:19 -0700)
committerLee Jones <lee.jones@linaro.org>
Tue, 7 Sep 2021 07:44:07 +0000 (08:44 +0100)
One MIPS platform (mach-rc32434) defines GPIOBASE. This macro
conflicts with one of the same name in lpc_sch.c. Rename the latter one
to prevent the build error.

../drivers/mfd/lpc_sch.c:25: error: "GPIOBASE" redefined [-Werror]
   25 | #define GPIOBASE        0x44
../arch/mips/include/asm/mach-rc32434/rb.h:32: note: this is the location of the previous definition
   32 | #define GPIOBASE        0x050000

Cc: Denis Turischev <denis@compulab.co.il>
Fixes: ad1f88037b76 ("mfd: Introduce lpc_sch for Intel SCH LPC bridge")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/lpc_sch.c

index 428a526cbe86346d98d3c1319dfaa306c3779a75..9ab9adce06fdda94abf4282c825420e8a15891ee 100644 (file)
@@ -22,7 +22,7 @@
 #define SMBASE         0x40
 #define SMBUS_IO_SIZE  64
 
-#define GPIOBASE       0x44
+#define GPIO_BASE      0x44
 #define GPIO_IO_SIZE   64
 #define GPIO_IO_SIZE_CENTERTON 128
 
@@ -145,7 +145,7 @@ static int lpc_sch_probe(struct pci_dev *dev, const struct pci_device_id *id)
        if (ret == 0)
                cells++;
 
-       ret = lpc_sch_populate_cell(dev, GPIOBASE, "sch_gpio",
+       ret = lpc_sch_populate_cell(dev, GPIO_BASE, "sch_gpio",
                                    info->io_size_gpio,
                                    id->device, &lpc_sch_cells[cells]);
        if (ret < 0)