projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm: gpio: Add a comment about not copying some drivers
[oweals/u-boot.git]
/
drivers
/
gpio
/
tegra_gpio.c
diff --git
a/drivers/gpio/tegra_gpio.c
b/drivers/gpio/tegra_gpio.c
index 687cd74fee6db36f53bd3acd1b49e4fdeb650744..49655831585689ec3f3d241d346dc5de1979c96e 100644
(file)
--- a/
drivers/gpio/tegra_gpio.c
+++ b/
drivers/gpio/tegra_gpio.c
@@
-337,11
+337,13
@@
static int gpio_tegra_bind(struct udevice *parent)
* This driver does not make use of interrupts, other than to figure
* out the number of GPIO banks
*/
* This driver does not make use of interrupts, other than to figure
* out the number of GPIO banks
*/
- if (!fdt_getprop(gd->fdt_blob, dev_of_offset(parent), "interrupts",
-
&len)
)
- return
-EINVAL
;
+ len = dev_read_size(parent, "interrupts");
+
if (len < 0
)
+ return
len
;
bank_count = len / 3 / sizeof(u32);
bank_count = len / 3 / sizeof(u32);
- ctlr = (struct gpio_ctlr *)devfdt_get_addr(parent);
+ ctlr = (struct gpio_ctlr *)dev_read_addr(parent);
+ if ((ulong)ctlr == FDT_ADDR_T_NONE)
+ return -EINVAL;
}
#endif
for (bank = 0; bank < bank_count; bank++) {
}
#endif
for (bank = 0; bank < bank_count; bank++) {