From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 2/2] hwrng: mxc-rnga - add driver support on boards with device tree References: <20180226183849.11562-1-vz@mleia.com> <20180226183849.11562-3-vz@mleia.com> <20180227094901.644cff57caadc97f65053d29@arm.com> From: Vladimir Zapolskiy Message-ID: Date: Tue, 27 Feb 2018 18:53:08 +0200 MIME-Version: 1.0 In-Reply-To: <20180227094901.644cff57caadc97f65053d29@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Kim Phillips Cc: Herbert Xu , Rob Herring , Arnd Bergmann , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-crypto@vger.kernel.org List-ID: On 02/27/2018 05:49 PM, Kim Phillips wrote: > On Mon, 26 Feb 2018 20:38:49 +0200 > Vladimir Zapolskiy wrote: > >> +#ifdef CONFIG_OF >> +static const struct of_device_id mxc_rnga_of_match[] = { >> + { .compatible = "fsl,imx31-rnga", }, >> + { /* sentinel */ }, >> +}; >> +MODULE_DEVICE_TABLE(of, mxc_rnga_of_match); >> +#endif >> + >> static struct platform_driver mxc_rnga_driver = { >> .driver = { >> - .name = "mxc_rnga", >> - }, >> + .name = "mxc_rnga", >> + .of_match_table = of_match_ptr(mxc_rnga_of_match), > > Does this build if CONFIG_OF is not set? > Definitely it is expected to be built, you can verify it directly or check of_match_ptr() macro definition from include/linux/of.h -- With best wishes, Vladimir