}
/* Start with WP disabled, if available */
- host->wp_gpio = gpiod_get_optional(&pdev->dev, NULL, GPIOD_OUT_LOW);
+ host->wp_gpio = devm_gpiod_get_optional(&pdev->dev, NULL, GPIOD_OUT_LOW);
res = PTR_ERR_OR_ZERO(host->wp_gpio);
if (res) {
if (res != -EPROBE_DEFER)
dma_release_channel(host->dma_chan);
enable_wp:
lpc32xx_wp_enable(host);
- gpiod_put(host->wp_gpio);
return res;
}
writel(tmp, SLC_CTRL(host->io_base));
lpc32xx_wp_enable(host);
- gpiod_put(host->wp_gpio);
}
static int lpc32xx_nand_resume(struct platform_device *pdev)