[PATCH v3] smc91x: add devicetree support
David Miller
davem at davemloft.net
Wed Jan 26 14:45:32 EST 2011
From: Thomas Chou <thomas at wytron.com.tw>
Date: Tue, 25 Jan 2011 20:11:48 +0800
> @@ -2394,6 +2395,13 @@ static int smc_drv_resume(struct device *dev)
> return 0;
> }
>
> +static const struct of_device_id smc91x_match[] = {
> + { .compatible = "smsc,lan91c94", },
> + { .compatible = "smsc,lan91c111", },
> + {},
> +}
> +MODULE_DEVICE_TABLE(of, smc91x_match);
> +
> static struct dev_pm_ops smc_drv_pm_ops = {
> .suspend = smc_drv_suspend,
> .resume = smc_drv_resume,
You should not unconditionally put the 'of' device table into the
module image, otherwise the module will be marked as being able to
support OF based devices but the code to support that won't actually
be comiled into the module.
More information about the devicetree-discuss
mailing list