summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-of-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 00:25:57 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 00:25:57 +0400
commitfce519588acfac249e8fdc1f5016c73d617de315 (patch)
treebea37c564c552cf69344c3bab7156308df7de662 /drivers/mmc/host/sdhci-of-core.c
parent7103dbed8e462f2a065381d23fde086cbd5b9891 (diff)
parentb1608d69cb804e414d0887140ba08a9398e4e638 (diff)
downloadlinux-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/mmc/host/sdhci-of-core.c')
-rw-r--r--drivers/mmc/host/sdhci-of-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index f9b611fc773e..60e4186a4345 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -124,8 +124,10 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
#endif
}
+static const struct of_device_id sdhci_of_match[];
static int __devinit sdhci_of_probe(struct platform_device *ofdev)
{
+ const struct of_device_id *match;
struct device_node *np = ofdev->dev.of_node;
struct sdhci_of_data *sdhci_of_data;
struct sdhci_host *host;
@@ -134,9 +136,10 @@ static int __devinit sdhci_of_probe(struct platform_device *ofdev)
int size;
int ret;
- if (!ofdev->dev.of_match)
+ match = of_match_device(sdhci_of_match, &ofdev->dev);
+ if (!match)
return -EINVAL;
- sdhci_of_data = ofdev->dev.of_match->data;
+ sdhci_of_data = match->data;
if (!of_device_is_available(np))
return -ENODEV;