[PATCH v3 06/11] mtd: nand: raw: rockchip_nfc: use dev_read_addr_ptr

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Fri Feb 17 09:45:45 CET 2023


On Thu, Feb 16, 2023 at 6:59 PM Johan Jonker <jbx6244 at gmail.com> wrote:
>
> 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 at gmail.com>
> ---
>  drivers/mtd/nand/raw/rockchip_nfc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/rockchip_nfc.c b/drivers/mtd/nand/raw/rockchip_nfc.c
> index d016d255..5d444133 100644
> --- a/drivers/mtd/nand/raw/rockchip_nfc.c
> +++ b/drivers/mtd/nand/raw/rockchip_nfc.c
> @@ -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);

Reviewed-By: Michael Trimarchi <michael at amarulasolutions.com>

> +       if (!nfc->regs) {
> +               ret = -ENODATA;
>                 goto release_nfc;
>         }
>
> --
> 2.20.1
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael at amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info at amarulasolutions.com
www.amarulasolutions.com


More information about the U-Boot mailing list