From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH v2] mtd: dataflash: add device tree probe support Date: Wed, 20 Jul 2011 07:40:38 +0300 Message-ID: <1311136844.20738.131.camel@sauron> References: <1310283313-32087-1-git-send-email-shawn.guo@linaro.org> <1310658757-17018-1-git-send-email-shawn.guo@linaro.org> <20110715025407.GF2927@ponder.secretlab.ca> <20110715044919.GB1840@S2100-06.ap.freescale.net> Reply-To: dedekind1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110715044919.GB1840-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Shawn Guo Cc: Artem Bityutskiy , patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Dmitry Eremin-Solenikov , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, David Woodhouse , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org 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