[PATCH v2] mtd: dataflash: add device tree probe support

Artem Bityutskiy dedekind1 at gmail.com
Wed Jul 20 00:40:38 EDT 2011


On Fri, 2011-07-15 at 12:49 +0800, Shawn Guo wrote:
> > > +static const struct of_device_id dataflash_dt_ids[] = {
> > > +	{ .compatible = "atmel,at45xxx", },
> > > +	{ .compatible = "atmel,dataflash", },
> > > +	{ /* sentinel */ }
> > > +};
> > > +
> > 
> > This should be protected with a #ifdef CONFIG_OF/#else/#endif, and
> > there should be a MODULE_DEVICE_TABLE().
> > 
> I personally hate #ifdef stuff.  But okay, I can do it since there
> are people being concerned by this little waste of space.

I guess the question is - will it compile and work if CONFIG_OF is
unset?


-- 
Best Regards,
Artem Bityutskiy




More information about the linux-arm-kernel mailing list