]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mtd: rawnand: Replace of_gpio_named_count() by gpiod_count()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 30 Aug 2022 18:33:36 +0000 (21:33 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 21 Sep 2022 08:38:46 +0000 (10:38 +0200)
As a preparation to unexport of_gpio_named_count(), convert the
driver to use gpiod_count() instead.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220830183336.49966-1-andriy.shevchenko@linux.intel.com
drivers/mtd/nand/raw/nand_base.c

index 5e99e4c96da4b0d7e6404948d956394215615c1e..5a70610ef118a4efb253afd87664592c639c9ba0 100644 (file)
@@ -5329,11 +5329,10 @@ static int of_get_nand_secure_regions(struct nand_chip *chip)
 int rawnand_dt_parse_gpio_cs(struct device *dev, struct gpio_desc ***cs_array,
                             unsigned int *ncs_array)
 {
-       struct device_node *np = dev->of_node;
        struct gpio_desc **descs;
        int ndescs, i;
 
-       ndescs = of_gpio_named_count(np, "cs-gpios");
+       ndescs = gpiod_count(dev, "cs");
        if (ndescs < 0) {
                dev_dbg(dev, "No valid cs-gpios property\n");
                return 0;