]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: nand: raw: rockchip_nfc: use dev_read_addr_ptr
authorJohan Jonker <jbx6244@gmail.com>
Mon, 13 Mar 2023 00:28:06 +0000 (01:28 +0100)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 6 May 2023 09:28:17 +0000 (17:28 +0800)
The fdt_addr_t and phys_addr_t size have been decoupled.
A 32bit CPU can expext 64-bit data from the device tree parser,
so use dev_read_addr_ptr in the rockchip_nfc.c file.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/raw/rockchip_nfc.c

index d016d255753140fec521ab9ba65e3e9134235d73..9f424a254e79fd48a388ba7bf5d18ae7389d88da 100644 (file)
@@ -1180,9 +1180,9 @@ static int rk_nfc_probe(struct udevice *dev)
        nfc->cfg = (void *)dev_get_driver_data(dev);
        nfc->dev = dev;
 
-       nfc->regs = (void *)dev_read_addr(dev);
-       if (IS_ERR(nfc->regs)) {
-               ret = PTR_ERR(nfc->regs);
+       nfc->regs = dev_read_addr_ptr(dev);
+       if (!nfc->regs) {
+               ret = -EINVAL;
                goto release_nfc;
        }