]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: rawnand: fsl_elbc: Fix reading address pointer from DT
authorPali Rohár <pali@kernel.org>
Fri, 19 Aug 2022 09:20:01 +0000 (11:20 +0200)
committerMichael Trimarchi <michael@amarulasolutions.com>
Mon, 22 Aug 2022 09:15:57 +0000 (11:15 +0200)
commitac30d240dbb520d0980f0687630feb702a14f51a
tree9a36696a6d1e0326451e30b32aee2cddc85bcbb3
parent080b7d89aeb4339e09029b7fd7e365f9ee37b4b6
mtd: rawnand: fsl_elbc: Fix reading address pointer from DT

During compilation gcc throws warning:

    drivers/mtd/nand/raw/fsl_elbc_nand.c: In function ‘fsl_elbc_nand_probe’:
    drivers/mtd/nand/raw/fsl_elbc_nand.c:841:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      return fsl_elbc_chip_init(0, (void *)dev_read_addr(dev), dev);
                                   ^

Fix it by using dev_read_addr_ptr() function which returns pointer instead
of dev_read_addr() which returns integer type.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/fsl_elbc_nand.c