Skip to content

Commit bf21f3f

Browse files
dtortsbogend
authored andcommitted
MIPS: Lantiq: vmmc: fix compile break introduced by gpiod patch
"MIPS: Lantiq: switch vmmc to use gpiod API" patch introduced compile errors, this patch fixes them. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent fe23057 commit bf21f3f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

arch/mips/lantiq/xway/vmmc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ static int vmmc_probe(struct platform_device *pdev)
2929
struct gpio_desc *gpio;
3030
int gpio_count;
3131
dma_addr_t dma;
32+
int error;
3233

3334
cp1_base =
3435
(void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE,
@@ -38,14 +39,15 @@ static int vmmc_probe(struct platform_device *pdev)
3839
while (gpio_count > 0) {
3940
gpio = devm_gpiod_get_index(&pdev->dev,
4041
NULL, --gpio_count, GPIOD_OUT_HIGH);
41-
if (IS_ERR(gpio)) {
42+
error = PTR_ERR_OR_ZERO(gpio);
43+
if (error) {
4244
dev_err(&pdev->dev,
4345
"failed to request GPIO idx %d: %d\n",
44-
gpio_count, PTR_ERR(gpio);
46+
gpio_count, error);
4547
continue;
4648
}
4749

48-
gpio_consumer_set_name(gpio, "vmmc-relay");
50+
gpiod_set_consumer_name(gpio, "vmmc-relay");
4951
}
5052

5153
dev_info(&pdev->dev, "reserved %dMB at 0x%p", CP1_SIZE >> 20, cp1_base);

0 commit comments

Comments
 (0)