[PATCH 1/3 v3] P4080/eLBC: Make Freescale elbc interrupt common to elbc devices

Anton Vorontsov cbouatmailru at gmail.com
Thu Sep 16 17:27:42 EST 2010


On Thu, Sep 16, 2010 at 02:41:22PM +0800, Roy Zang wrote:
[...]
> +static const struct platform_device_id fsl_lbc_match[] = {
> +	{ "fsl,elbc", },
> +	{ "fsl,pq3-localbus", },
> +	{ "fsl,pq2-localbus", },
> +	{ "fsl,pq2pro-localbus", },
> +	{},
> +};
> +
> +static struct platform_driver fsl_lbc_ctrl_driver = {
> +	.driver = {
> +		.name = "fsl-lbc",
> +	},
> +	.probe = fsl_lbc_ctrl_probe,
> +	.id_table = fsl_lbc_match,
> +};

No, it won't work that way (at least not w/o a device constructor
somewhere in fsl_soc.c). Instead, you should write something like

static const struct of_device_id fsl_lbc_match[] = {
	...
};

static struct platform_driver fsl_lbc_ctrl_driver = {
	.driver = {
		.name = "fsl-lbc",
		.of_match_table = fsl_lbc_match;
	}
	...
};

(Note that platform_driver.driver has of_match_table nowadays --
 that's what makes it possible to seamlessly transit from
 of_platform_driver to platform_driver.)

The same applies for the second patch as well.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2


More information about the Linuxppc-dev mailing list