Message ID | 87ppd0xfwo.fsf@free.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Thu, Nov 06, 2014 at 08:55:35PM +0100, Robert Jarzmik wrote: > Daniel Mack <daniel@zonque.org> writes: > > > On 11/06/2014 05:55 AM, Felipe Balbi wrote: > >> in case kernel is built without CONFIG_OF there > >> will be a build warning (see below) due to of_match_ptr() > >> being defined to NULL. > >> > >> Because of_match_ptr() is pretty pointless anyway, > >> let's just remove it and fix the warning. > > > > The alternative, of course, would be to wrap the udc_pxa_dt_ids > > declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's > > worth it. > > Ah, wasn't the patch named "[PATCH v1] usb: gadget: pxa27x_udc: fix > warning in non device-tree build" sent October the 29th fixing this > issue (in [1]) ? I seem to have missed that, let me replace the patches and use yours.
On Thu, Nov 06, 2014 at 04:17:48PM -0600, Felipe Balbi wrote: > Hi, > > On Thu, Nov 06, 2014 at 08:55:35PM +0100, Robert Jarzmik wrote: > > Daniel Mack <daniel@zonque.org> writes: > > > > > On 11/06/2014 05:55 AM, Felipe Balbi wrote: > > >> in case kernel is built without CONFIG_OF there > > >> will be a build warning (see below) due to of_match_ptr() > > >> being defined to NULL. > > >> > > >> Because of_match_ptr() is pretty pointless anyway, > > >> let's just remove it and fix the warning. > > > > > > The alternative, of course, would be to wrap the udc_pxa_dt_ids > > > declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's > > > worth it. > > > > Ah, wasn't the patch named "[PATCH v1] usb: gadget: pxa27x_udc: fix > > warning in non device-tree build" sent October the 29th fixing this > > issue (in [1]) ? > > I seem to have missed that, let me replace the patches and use yours. now done.
Felipe Balbi <balbi@ti.com> writes: > On Thu, Nov 06, 2014 at 04:17:48PM -0600, Felipe Balbi wrote: >> I seem to have missed that, let me replace the patches and use yours. > > now done. Thanks.
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index 69e7b816..9b03fab 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.c +++ b/drivers/usb/gadget/udc/pxa27x_udc.c @@ -2400,11 +2400,13 @@ static struct pxa_udc memory = { } }; +#if defined(CONFIG_OF) static struct of_device_id udc_pxa_dt_ids[] = { { .compatible = "marvell,pxa270-udc" }, {} }; MODULE_DEVICE_TABLE(of, udc_pxa_dt_ids); +#endif /** * pxa_udc_probe - probes the udc device