[PATCH v2] mtd: nand: gpio: Remove unneeded CONFIG_OF

Brian Norris computersforpeace at gmail.com
Mon Dec 9 16:22:36 EST 2013


On Mon, Dec 09, 2013 at 06:17:51PM -0300, Ezequiel Garcia wrote:
> By the way, has anyone actually *tried* this driver with !OF lately?
> I guess I'm missing something but it seems to me it won't probe:
> 
> static inline int gpio_nand_get_config_of(const struct device *dev,
>                                           struct gpio_nand_platdata *plat)
> {
> 	return -ENOSYS;
> }
> 
> static inline int gpio_nand_get_config(const struct device *dev,
>                                        struct gpio_nand_platdata *plat)
> {
> 	int ret = gpio_nand_get_config_of(dev, plat);
> 	if (!ret)

^^^ if (! (-ENOSYS)) ====> if (0)

> 		return ret;
> 	[..]
> }
> 
> static int gpio_nand_probe(struct platform_device *pdev)
> {
> 	[..]
> 	ret = gpio_nand_get_config(&pdev->dev, &gpiomtd->plat);
> 	if (ret)
> 		return ret;
[..]
> }

Looks OK to me, but I haven't tested it. What do you see? Perhaps you
were incorrectly reading the line I pointed to?

Brian



More information about the linux-mtd mailing list