[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140821111940.GX4266@lee--X1>
Date: Thu, 21 Aug 2014 12:19:40 +0100
From: Lee Jones <lee.jones@...aro.org>
To: Thierry Reding <thierry.reding@...il.com>
Cc: Gyungoh Yoo <gyungoh@...il.com>, robh+dt@...nel.org,
pawel.moll@....com, mark.rutland@....com,
ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
grant.likely@...aro.org, sameo@...ux.intel.com,
jack.yoo@...worksinc.com, jason@...edaemon.net,
heiko.stuebner@...eaders.com, florian.vaussard@...l.ch,
andrew@...n.ch, silvio.fricke@...il.com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Adding Skyworks SKY81452 MFD driver
On Thu, 21 Aug 2014, Thierry Reding wrote:
> On Thu, Aug 21, 2014 at 10:45:02AM +0100, Lee Jones wrote:
> [...]
> > > diff --git a/drivers/mfd/sky81452.c b/drivers/mfd/sky81452.c
> [...]
> > > + * This program is free software; you can redistribute it and/or modify it
> > > + * under the terms of the GNU General Public License as published by the
> > > + * Free Software Foundation; either version 2, or (at your option) any
> > > + * later version.
> [...]
> > > + { }
> > > +};
> > > +MODULE_DEVICE_TABLE(i2c, sky81452_ids);
> > > +
> > > +#ifdef CONFIG_OF
> > > +static const struct of_device_id sky81452_of_match[] = {
> > > + { .compatible = "skyworks,sky81452", },
> > > + { }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, sky81452_of_match);
> > > +#endif
> >
> > You can drop the #differy the compiler should sort that out on the
> > back of of_match_ptr().
>
> It won't, unfortunately. If !OF, then of_match_ptr(x) will evaluate to
> NULL, therefore sky81452_of_match will become unreferenced and cause the
> compiler to output a warning. I guess it could be made __maybe_unused,
> but I don't see that as much of an advantage over the #ifdef.
Yes, I suppose it would. That's sad.
> > > +static struct i2c_driver sky81452_driver = {
> > > + .driver = {
> > > + .name = "sky81452",
> > > + .of_match_table = of_match_ptr(sky81452_of_match),
> > > + },
> > > + .probe = sky81452_probe,
> > > + .remove = sky81452_remove,
> > > + .id_table = sky81452_ids,
> > > +};
> > > +
> > > +module_i2c_driver(sky81452_driver);
> > > +
> > > +MODULE_DESCRIPTION("Skyworks SKY81452 MFD driver");
> > > +MODULE_AUTHOR("Gyungoh Yoo <jack.yoo@...worksinc.com>");
> > > +MODULE_LICENSE("GPL");
> >
> > I think you want v2.
>
> The header comment says "... version 2, or (at your option) any later
> version.", so I think "GPL" is the right one here.
Fair enough. Withdrawn.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists