lkml.org 
[lkml]   [2015]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 2/2] watchdog: jz4740: Add DT support
    Date
    On Tuesday 27 January 2015 15:11:30 Zubair Lutfullah Kakakhel wrote:
    > };
    >
    > +#ifdef CONFIG_OF
    > +static const struct of_device_id jz4740_of_matches[] = {
    > + { .compatible = "ingenic,jz4740-watchdog", },
    > + { /* sentinel */ }
    > +};
    > +#endif
    > +
    > static int jz4740_wdt_probe(struct platform_device *pdev)
    > {
    > struct jz4740_wdt_drvdata *drvdata;
    > @@ -211,6 +219,7 @@ static struct platform_driver jz4740_wdt_driver = {
    > .remove = jz4740_wdt_remove,
    > .driver = {
    > .name = "jz4740-wdt",
    > + .of_match_table = of_match_ptr(jz4740_of_matches),
    > },
    >

    Why the #ifdef? Presumably we want to move over jz4740 to DT-only in the
    long run, so you could just remove the #ifdef and the of_match_ptr()
    wrapper.

    Also, you should add a MODULE_DEVICE_TABLE() entry.

    Arnd


    \
     
     \ /
      Last update: 2015-01-27 21:21    [W:4.655 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site