lkml.org 
[lkml]   [2014]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 2/3] power: gpio-charger: add device tree support
Date
Am Montag, 22. September 2014, 09:48:33 schrieb Doug Anderson:
> > @@ -196,6 +255,7 @@ static struct platform_driver gpio_charger_driver = {
> >
> > .name = "gpio-charger",
> > .owner = THIS_MODULE,
> > .pm = &gpio_charger_pm_ops,
> >
> > + .of_match_table = of_match_ptr(gpio_charger_match),
>
> Given that you don't have any #ifdefs with "CONFIG_OF", I think
> gpio_charger_match will always exist. It seems like you should remove
> the of_match_ptr or add some #ifdefs. I can't quite keep up with what
> the currently suggested best practice is here, though.

I've kept the of_match_ptr in v3. The dt parsing functions (of_read_foo,...)
define stubs for the !CONFIG_OF case which we use here in this case and
of_match_ptr is also defined differently for both OF and !OF, so it feels like
it should be there ;-)


Heiko


\
 
 \ /
  Last update: 2014-09-23 14:41    [W:0.047 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site