projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MIPS: Lantiq: vmmc: fix compile break introduced by gpiod patch
[platform/kernel/linux-starfive.git]
/
arch
/
mips
/
lantiq
/
xway
/
vmmc.c
diff --git
a/arch/mips/lantiq/xway/vmmc.c
b/arch/mips/lantiq/xway/vmmc.c
index
a194730
..
2796e87
100644
(file)
--- 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;
struct gpio_desc *gpio;
int gpio_count;
dma_addr_t dma;
+ int error;
cp1_base =
(void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE,
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);
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",
dev_err(&pdev->dev,
"failed to request GPIO idx %d: %d\n",
- gpio_count,
PTR_ERR(gpio
);
+ gpio_count,
error
);
continue;
}
continue;
}
- gpio
_consumer_set
_name(gpio, "vmmc-relay");
+ gpio
d_set_consumer
_name(gpio, "vmmc-relay");
}
dev_info(&pdev->dev, "reserved %dMB at 0x%p", CP1_SIZE >> 20, cp1_base);
}
dev_info(&pdev->dev, "reserved %dMB at 0x%p", CP1_SIZE >> 20, cp1_base);