X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Fmips%2Flantiq%2Fxway%2Fvmmc.c;h=2796e87dfcae31fbcebb60e218ae4bd6b5107d1f;hb=bf21f3f8d0336ec28d9ab09ad274ac0bd71b7cf8;hp=a1947306ac18544228109b09b1d700ab6342c225;hpb=fe23057cbc042073f7a05a92ed2cd1d2b3c81f28;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/arch/mips/lantiq/xway/vmmc.c b/arch/mips/lantiq/xway/vmmc.c index a194730..2796e87 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);