diff options
-rw-r--r-- | drivers/mmc/host/meson-mx-sdio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 09cb89645d06..2cfec33178c1 100644 --- a/drivers/mmc/host/meson-mx-sdio.c +++ b/drivers/mmc/host/meson-mx-sdio.c | |||
@@ -517,19 +517,23 @@ static struct mmc_host_ops meson_mx_mmc_ops = { | |||
517 | static struct platform_device *meson_mx_mmc_slot_pdev(struct device *parent) | 517 | static struct platform_device *meson_mx_mmc_slot_pdev(struct device *parent) |
518 | { | 518 | { |
519 | struct device_node *slot_node; | 519 | struct device_node *slot_node; |
520 | struct platform_device *pdev; | ||
520 | 521 | ||
521 | /* | 522 | /* |
522 | * TODO: the MMC core framework currently does not support | 523 | * TODO: the MMC core framework currently does not support |
523 | * controllers with multiple slots properly. So we only register | 524 | * controllers with multiple slots properly. So we only register |
524 | * the first slot for now | 525 | * the first slot for now |
525 | */ | 526 | */ |
526 | slot_node = of_find_compatible_node(parent->of_node, NULL, "mmc-slot"); | 527 | slot_node = of_get_compatible_child(parent->of_node, "mmc-slot"); |
527 | if (!slot_node) { | 528 | if (!slot_node) { |
528 | dev_warn(parent, "no 'mmc-slot' sub-node found\n"); | 529 | dev_warn(parent, "no 'mmc-slot' sub-node found\n"); |
529 | return ERR_PTR(-ENOENT); | 530 | return ERR_PTR(-ENOENT); |
530 | } | 531 | } |
531 | 532 | ||
532 | return of_platform_device_create(slot_node, NULL, parent); | 533 | pdev = of_platform_device_create(slot_node, NULL, parent); |
534 | of_node_put(slot_node); | ||
535 | |||
536 | return pdev; | ||
533 | } | 537 | } |
534 | 538 | ||
535 | static int meson_mx_mmc_add_host(struct meson_mx_mmc_host *host) | 539 | static int meson_mx_mmc_add_host(struct meson_mx_mmc_host *host) |