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

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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)