mtd: rawnand: meson: use of_property_count_elems_of_size helper
commit2d8ffbf569440f72b05a16f12453c25195220000
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Thu, 11 Apr 2019 22:00:54 +0000 (12 00:00 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 18 Apr 2019 06:54:06 +0000 (18 08:54 +0200)
tree946d2377300b4656a8ab96a4a2482c03731af85a
parent5f73f240a4ffe49f596314312f1d3731d011e195
mtd: rawnand: meson: use of_property_count_elems_of_size helper

Use the of_property_count_elems_of_size() helper instead of open-coding
it's logic. As a bonus this will now error out if the "reg" property
values use an incorrect size (anything other than sizeof(u32)).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by:Liang Yang <liang.yang@amlogic.com>
Acked-by: Liang Yang <liang.yang@amlogic.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/meson_nand.c