Message ID | 1381820660-5501-3-git-send-email-archit@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 15, 2013 at 08:04:20AM +0100, Archit Taneja wrote: > Enable use of DT for DMM/Tiler. > > Originally worked on by Andy Gross <andygro@gmail.com> > > Cc: Andy Gross <andygro@gmail.com> > Cc: DRI Development <dri-devel@lists.freedesktop.org> > Signed-off-by: Archit Taneja <archit@ti.com> > --- > drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c > index acf6678..59f17de 100644 > --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c > +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c > @@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { > }; > #endif > > +#if defined(CONFIG_OF) > +static const struct of_device_id dmm_of_match[] = { > + { .compatible = "ti,omap4-dmm", }, > + { .compatible = "ti,omap5-dmm", }, > + {}, > +}; > +#else > +#define dmm_of_match NULL > +#endif > + > struct platform_driver omap_dmm_driver = { > .probe = omap_dmm_probe, > .remove = omap_dmm_remove, > .driver = { > .owner = THIS_MODULE, > .name = DMM_DRIVER_NAME, > + .of_match_table = dmm_of_match, If you use of_match_ptr(dmm_of_match) here you don't need the #else case above. Thanks, Mark. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Friday 01 November 2013 06:10 AM, Mark Rutland wrote: > On Tue, Oct 15, 2013 at 08:04:20AM +0100, Archit Taneja wrote: >> Enable use of DT for DMM/Tiler. >> >> Originally worked on by Andy Gross <andygro@gmail.com> >> >> Cc: Andy Gross <andygro@gmail.com> >> Cc: DRI Development <dri-devel@lists.freedesktop.org> >> Signed-off-by: Archit Taneja <archit@ti.com> >> --- >> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c >> index acf6678..59f17de 100644 >> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c >> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c >> @@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { >> }; >> #endif >> >> +#if defined(CONFIG_OF) >> +static const struct of_device_id dmm_of_match[] = { >> + { .compatible = "ti,omap4-dmm", }, >> + { .compatible = "ti,omap5-dmm", }, >> + {}, >> +}; >> +#else >> +#define dmm_of_match NULL >> +#endif >> + >> struct platform_driver omap_dmm_driver = { >> .probe = omap_dmm_probe, >> .remove = omap_dmm_remove, >> .driver = { >> .owner = THIS_MODULE, >> .name = DMM_DRIVER_NAME, >> + .of_match_table = dmm_of_match, > > If you use of_match_ptr(dmm_of_match) here you don't need the #else case above. Thanks for the tip. I'll make this update. Archit -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index acf6678..59f17de 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { }; #endif +#if defined(CONFIG_OF) +static const struct of_device_id dmm_of_match[] = { + { .compatible = "ti,omap4-dmm", }, + { .compatible = "ti,omap5-dmm", }, + {}, +}; +#else +#define dmm_of_match NULL +#endif + struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner = THIS_MODULE, .name = DMM_DRIVER_NAME, + .of_match_table = dmm_of_match, #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif
Enable use of DT for DMM/Tiler. Originally worked on by Andy Gross <andygro@gmail.com> Cc: Andy Gross <andygro@gmail.com> Cc: DRI Development <dri-devel@lists.freedesktop.org> Signed-off-by: Archit Taneja <archit@ti.com> --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)