diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-09-27 18:29:42 +0300 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2022-09-27 22:29:08 +0300 |
commit | bf21f3f8d0336ec28d9ab09ad274ac0bd71b7cf8 (patch) | |
tree | 3a158cd18998476346ccb47ef5b4891b76a9a0b3 /arch/mips/lantiq | |
parent | fe23057cbc042073f7a05a92ed2cd1d2b3c81f28 (diff) | |
download | linux-bf21f3f8d0336ec28d9ab09ad274ac0bd71b7cf8.tar.xz |
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>
Diffstat (limited to 'arch/mips/lantiq')
-rw-r--r-- | arch/mips/lantiq/xway/vmmc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/mips/lantiq/xway/vmmc.c b/arch/mips/lantiq/xway/vmmc.c index a1947306ac18..2796e87dfcae 100644 --- a/arch/mips/lantiq/xway/vmmc.c +++ b/arch/mips/lantiq/xway/vmmc.c @@ -29,6 +29,7 @@ static int vmmc_probe(struct platform_device *pdev) struct gpio_desc *gpio; int gpio_count; dma_addr_t dma; + int error; cp1_base = (void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE, @@ -38,14 +39,15 @@ static int vmmc_probe(struct platform_device *pdev) while (gpio_count > 0) { gpio = devm_gpiod_get_index(&pdev->dev, NULL, --gpio_count, GPIOD_OUT_HIGH); - if (IS_ERR(gpio)) { + error = PTR_ERR_OR_ZERO(gpio); + if (error) { dev_err(&pdev->dev, "failed to request GPIO idx %d: %d\n", - gpio_count, PTR_ERR(gpio); + gpio_count, error); continue; } - gpio_consumer_set_name(gpio, "vmmc-relay"); + gpiod_set_consumer_name(gpio, "vmmc-relay"); } dev_info(&pdev->dev, "reserved %dMB at 0x%p", CP1_SIZE >> 20, cp1_base); |