public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: jacopo mondi <jacopo@jmondi.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	"H . Nikolaus Schaller" <hns@goldelico.com>,
	Hugues Fruchet <hugues.fruchet@st.com>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v2 1/2] media: ov9650: support device tree probing
Date: Mon, 8 Jan 2018 11:29:44 +0100	[thread overview]
Message-ID: <20180108102944.GN9493@w540> (raw)
In-Reply-To: <20180108093712.xqpxmgbqsmkhw632@paasikivi.fi.intel.com>

Hi Sakari,

On Mon, Jan 08, 2018 at 11:37:12AM +0200, Sakari Ailus wrote:
> Hi Jacopo,
>
> On Mon, Jan 08, 2018 at 10:18:38AM +0100, jacopo mondi wrote:
> > > @@ -1561,9 +1605,19 @@ static const struct i2c_device_id ov965x_id[] = {
> > >  };
> > >  MODULE_DEVICE_TABLE(i2c, ov965x_id);
> > >
> > > +#if IS_ENABLED(CONFIG_OF)
> > > +static const struct of_device_id ov965x_of_match[] = {
> > > +	{ .compatible = "ovti,ov9650", },
> > > +	{ .compatible = "ovti,ov9652", },
> > > +	{ /* sentinel */ }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, ov965x_of_match);
> > > +#endif
> > > +
> > >  static struct i2c_driver ov965x_i2c_driver = {
> > >  	.driver = {
> > >  		.name	= DRIVER_NAME,
> > > +		.of_match_table = of_match_ptr(ov965x_of_match),
> >
> > If CONFIG_OF is not defined, this will break compilation.
> > Please guard this with #if IS_ENABLED(CONFIG_OF) as well.
>
> of_match_ptr() will be NULL if CONFIG_OF is not defined, so AFAICT this is
> fine.
>

That's even better. Thanks for pointing this out!
Please ignore my comment then!

Cheers
   j

> --
> Sakari Ailus
> sakari.ailus@linux.intel.com

  reply	other threads:[~2018-01-08 10:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07 16:54 [PATCH v2 0/2] media: ov9650: support device tree probing Akinobu Mita
2018-01-07 16:54 ` [PATCH v2 1/2] " Akinobu Mita
2018-01-08  9:18   ` jacopo mondi
2018-01-08  9:37     ` Sakari Ailus
2018-01-08 10:29       ` jacopo mondi [this message]
2018-01-12 14:14   ` Sylwester Nawrocki
2018-01-13 16:08     ` Akinobu Mita
2018-01-07 16:54 ` [PATCH v2 2/2] media: ov9650: add device tree binding Akinobu Mita
2018-01-08  9:35   ` Sakari Ailus
2018-01-12 14:15     ` Sylwester Nawrocki
2018-01-13 16:10       ` Akinobu Mita
2018-01-11 20:40   ` Rob Herring

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=20180108102944.GN9493@w540 \
    --to=jacopo@jmondi.org \
    --cc=akinobu.mita@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=hugues.fruchet@st.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox