All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, Alexander Shiyan <shc_work@mail.ru>
Subject: Re: [PATCH v2] mtd: nand: gpio: Remove unneeded CONFIG_OF
Date: Mon, 9 Dec 2013 18:39:31 -0300	[thread overview]
Message-ID: <20131209213930.GE31944@localhost> (raw)
In-Reply-To: <20131209212236.GW27149@ld-irv-0074.broadcom.com>

On Mon, Dec 09, 2013 at 01:22:36PM -0800, Brian Norris wrote:
> 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)
> 

Ah.. yes...

> > 		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?
> 

I knew I was missing something! Yes, that line confused me.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

      reply	other threads:[~2013-12-09 21:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07 15:36 [PATCH v2] mtd: nand: gpio: Remove unneeded CONFIG_OF Ezequiel Garcia
2013-12-09 20:31 ` Brian Norris
2013-12-09 21:17   ` Ezequiel Garcia
2013-12-09 21:22     ` Brian Norris
2013-12-09 21:39       ` Ezequiel Garcia [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131209213930.GE31944@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shc_work@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.