lkml.org 
[lkml]   [2014]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@skyworksinc.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-08-21 14:01    [W:0.717 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site