diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-18 20:25:57 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-18 20:25:57 (GMT) |
commit | fce519588acfac249e8fdc1f5016c73d617de315 (patch) | |
tree | bea37c564c552cf69344c3bab7156308df7de662 /drivers/net/can/mscan/mpc5xxx_can.c | |
parent | 7103dbed8e462f2a065381d23fde086cbd5b9891 (diff) | |
parent | b1608d69cb804e414d0887140ba08a9398e4e638 (diff) | |
download | linux-fsl-qoriq-fce519588acfac249e8fdc1f5016c73d617de315.tar.xz |
Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
drivercore: revert addition of of_match to struct device
of: fix race when matching drivers
Diffstat (limited to 'drivers/net/can/mscan/mpc5xxx_can.c')
-rw-r--r-- | drivers/net/can/mscan/mpc5xxx_can.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index bd1d811..5fedc33 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -247,8 +247,10 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, } #endif /* CONFIG_PPC_MPC512x */ +static struct of_device_id mpc5xxx_can_table[]; static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) { + const struct of_device_id *match; struct mpc5xxx_can_data *data; struct device_node *np = ofdev->dev.of_node; struct net_device *dev; @@ -258,9 +260,10 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) int irq, mscan_clksrc = 0; int err = -ENOMEM; - if (!ofdev->dev.of_match) + match = of_match_device(mpc5xxx_can_table, &ofdev->dev); + if (!match) return -EINVAL; - data = (struct mpc5xxx_can_data *)ofdev->dev.of_match->data; + data = match->data; base = of_iomap(np, 0); if (!base) { |