Commit a2d0e5c6 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Miquel Raynal

mtd: rawnand: stm32_fmc2: switch to using devm_fwnode_gpiod_get()

I would like to stop exporting OF-specific devm_gpiod_get_from_of_node()
so that gpiolib can be cleaned a bit, so let's switch to the generic
fwnode property API.
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220903-gpiod_get_from_of_node-remove-v1-3-b29adfb27a6c@gmail.com
parent 4c5f69ae
......@@ -1801,9 +1801,8 @@ static int stm32_fmc2_nfc_parse_child(struct stm32_fmc2_nfc *nfc,
nand->cs_used[i] = cs;
}
nand->wp_gpio = devm_gpiod_get_from_of_node(nfc->dev, dn,
"wp-gpios", 0,
GPIOD_OUT_HIGH, "wp");
nand->wp_gpio = devm_fwnode_gpiod_get(nfc->dev, of_fwnode_handle(dn),
"wp", GPIOD_OUT_HIGH, "wp");
if (IS_ERR(nand->wp_gpio)) {
ret = PTR_ERR(nand->wp_gpio);
if (ret != -ENOENT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment