lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv7] media: i2c/adp1653: Devicetree support for adp1653
On Thu, Apr 09, 2015 at 01:29:43PM +0200, Pavel Machek wrote:
> On Thu 2015-04-09 11:10:17, Sebastian Reichel wrote:
> > On Thu, Apr 09, 2015 at 09:42:38AM +0200, Pavel Machek wrote:
> > > [...]
> > > +#include <linux/of_gpio.h>
> > > +#include <linux/gpio.h>
> > > [...]
> >
> > This should probably be
> >
> > #include <linux/of.h>
> > #include <linux/gpio/consumer.h>
>
> And I thought people would only bikesched paint on the
> Documentation. Sakari, feel free to change that, but

> a) I don't see why Sebastian's version is better

You neither use <linux/of_gpio.h> nor <linux/gpio.h>.

Well "include/linux/gpio.h" describes the old gpio API. The new
gpiod gpiod API is described in "include/linux/gpio/consumer.h" and
you use it, so the include should be included ;)

You don't use anything from "include/linux/of_gpio.h", but it
includes "include/linux/of.h", which you are using. So you should
include <linux/of.h> instead ;)

> b) am pretty sure there is about infinite number of
> possibilities there.

Yes, but most are wrong. You should include all headers,
that are used by you - nothing more and nothing less.

-- Sebastian
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-04-09 15:01    [W:0.093 / U:24.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site