u-boot/drivers/usb/host
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
..
dwc2.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
dwc2.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dwc3-of-simple.c usb: dwc3-of-simple: Drop redundant inclding header file 2020-04-13 13:48:30 +02:00
dwc3-sti-glue.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-armada100.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-atmel.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
ehci-exynos.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
ehci-faraday.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-fsl.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
ehci-generic.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-marvell.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
ehci-msm.c usb: ehci-msm: Use dev interface to get device address 2020-04-13 13:48:30 +02:00
ehci-mx5.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-mx6.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-mxc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-mxs.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-omap.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-pci.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-rmobile.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-spear.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-tegra.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-vct.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ehci-vf.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-zynq.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ehci.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig driver: usb: drop legacy rockchip xhci driver 2020-05-30 07:38:50 +08:00
Makefile driver: usb: drop legacy rockchip xhci driver 2020-05-30 07:38:50 +08:00
ohci-at91.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ohci-da8xx.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ohci-ep93xx.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ohci-generic.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ohci-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ohci-lpc32xx.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ohci-pci.c usb, ohci, pci: add DM support for PCI-based OHCI USB controller 2019-08-08 11:35:02 +02:00
ohci.h usb: ohci: Add header file for ARCH_DMA_MINALIGN 2020-06-02 13:06:10 -04:00
r8a66597-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
r8a66597.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sl811-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
sl811.h
usb-sandbox.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
usb-uclass.c usb: provide a device tree node to USB devices 2020-06-11 20:52:11 -06:00
utmi-armada100.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xhci-brcm.c drivers: usb: host: Add BRCM xHCI driver 2020-04-13 13:48:41 +02:00
xhci-dwc3.c usb: dwc3: fix NULL pointer issue 2020-05-22 15:22:36 +02:00
xhci-exynos5.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
xhci-fsl.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
xhci-mem.c usb: xhci: Add reset controller support 2020-07-10 11:49:28 +02:00
xhci-mtk.c xhci: mediatek: Add support for MTK xHCI host controller 2020-05-02 12:32:28 +02:00
xhci-mvebu.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
xhci-omap.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
xhci-pci.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
xhci-rcar-r8a779x_usb3_v3.h usb: xhci: Add Renesas R-Car xHCI driver 2017-11-26 02:22:36 +01:00
xhci-rcar.c Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
xhci-ring.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
xhci.c usb: xhci: Add reset controller support 2020-07-10 11:49:28 +02:00