u-boot-brain/drivers/pinctrl
Masahiro Yamada 8613c8d897 treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr()
Use the _ptr suffixed variant instead of casting. Also, convert it to
dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE.

One curious part is an error check like follows in
drivers/watchdog/omap_wdt.c:

    priv->regs = (struct wd_timer *)devfdt_get_addr(dev);
    if (!priv->regs)
            return -EINVAL;

devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error.
So, this code does not catch any error in DT parsing.

dev_read_addr_ptr() returns NULL on error, so this error check
will work.

I generated this commit by the following command:

 $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \
   xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/'

I manually fixed drivers/usb/host/ehci-mx6.c

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-07-25 14:46:57 -06:00
..
aspeed common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ath79 Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
broadcom dm: Fix error handling for dev_read_addr_ptr 2020-07-01 15:01:21 +08:00
exynos Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
intel x86: pinctrl: Drop the acpi_path member 2020-07-17 14:32:24 +08:00
mediatek dm: Fix error handling for dev_read_addr_ptr 2020-07-01 15:01:21 +08:00
meson common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mscc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtmips dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
mvebu treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
nxp pinctrl: imx5: move soc info to data section 2020-07-14 15:23:46 +08:00
renesas Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
rockchip drivers: rename drivers to match compatible string 2020-07-09 18:57:22 -06:00
uniphier Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
Kconfig x86: Add a generic Intel pinctrl driver 2019-12-15 11:44:25 +08:00
Makefile x86: Add a generic Intel pinctrl driver 2019-12-15 11:44:25 +08:00
pinctrl_pic32.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pinctrl_stm32.c pinctrl: stm32: add information on pin configuration 2020-07-07 16:01:23 +02:00
pinctrl-at91-pio4.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
pinctrl-at91.c core: add support for U_BOOT_DRIVER_ALIAS 2020-07-09 18:57:22 -06:00
pinctrl-generic.c dm: pinctrl: migrate pinctrl-generic to livetree 2020-04-16 23:06:54 -04:00
pinctrl-sandbox.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pinctrl-single.c dm: pinctrl: Use right device pointer for configuring pinctrl 2020-04-23 08:25:37 -04:00
pinctrl-sti.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
pinctrl-stmfx.c pinctrl: stmfx: add information on pin configuration 2020-07-07 16:01:23 +02:00
pinctrl-uclass.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00