Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: lpc32xx_slc: Make probe() return -EPROBE_DEFER if necessary

Via of_get_named_gpio(), wp_gpio can become -EPROBE_DEFER which now makes
probe() return -EPROBE_DEFER as well to wait until the gpio controller is
probed before trying to probe lpc32xx_slc again.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

authored by

Roland Stigge and committed by
David Woodhouse
d5842ab7 21535ab3

+2
+2
drivers/mtd/nand/lpc32xx_slc.c
··· 821 821 dev_err(&pdev->dev, "Missing platform data\n"); 822 822 return -ENOENT; 823 823 } 824 + if (host->ncfg->wp_gpio == -EPROBE_DEFER) 825 + return -EPROBE_DEFER; 824 826 if (gpio_is_valid(host->ncfg->wp_gpio) && 825 827 gpio_request(host->ncfg->wp_gpio, "NAND WP")) { 826 828 dev_err(&pdev->dev, "GPIO not available\n");