wmt-sdmmc.c (cbecf716ca618fd44feda6bd9a64a8179d031fc5) | wmt-sdmmc.c (1b3eebf17c028d2f083ded6ca84ff8576f199ec4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * WM8505/WM8650 SD/MMC Host Controller 4 * 5 * Copyright (C) 2010 Tony Prisk 6 * Copyright (C) 2008 WonderMedia Technologies, Inc. 7 */ 8 --- 737 unchanged lines hidden (view full) --- 746 { /* Sentinel */ }, 747}; 748 749static int wmt_mci_probe(struct platform_device *pdev) 750{ 751 struct mmc_host *mmc; 752 struct wmt_mci_priv *priv; 753 struct device_node *np = pdev->dev.of_node; | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * WM8505/WM8650 SD/MMC Host Controller 4 * 5 * Copyright (C) 2010 Tony Prisk 6 * Copyright (C) 2008 WonderMedia Technologies, Inc. 7 */ 8 --- 737 unchanged lines hidden (view full) --- 746 { /* Sentinel */ }, 747}; 748 749static int wmt_mci_probe(struct platform_device *pdev) 750{ 751 struct mmc_host *mmc; 752 struct wmt_mci_priv *priv; 753 struct device_node *np = pdev->dev.of_node; |
754 const struct of_device_id *of_id = 755 of_match_device(wmt_mci_dt_ids, &pdev->dev); | |
756 const struct wmt_mci_caps *wmt_caps; 757 int ret; 758 int regular_irq, dma_irq; 759 | 754 const struct wmt_mci_caps *wmt_caps; 755 int ret; 756 int regular_irq, dma_irq; 757 |
760 if (!of_id || !of_id->data) { | 758 wmt_caps = of_device_get_match_data(&pdev->dev); 759 if (!wmt_caps) { |
761 dev_err(&pdev->dev, "Controller capabilities data missing\n"); 762 return -EFAULT; 763 } 764 | 760 dev_err(&pdev->dev, "Controller capabilities data missing\n"); 761 return -EFAULT; 762 } 763 |
765 wmt_caps = of_id->data; 766 | |
767 if (!np) { 768 dev_err(&pdev->dev, "Missing SDMMC description in devicetree\n"); 769 return -EFAULT; 770 } 771 772 regular_irq = irq_of_parse_and_map(np, 0); 773 dma_irq = irq_of_parse_and_map(np, 1); 774 --- 230 unchanged lines hidden --- | 764 if (!np) { 765 dev_err(&pdev->dev, "Missing SDMMC description in devicetree\n"); 766 return -EFAULT; 767 } 768 769 regular_irq = irq_of_parse_and_map(np, 0); 770 dma_irq = irq_of_parse_and_map(np, 1); 771 --- 230 unchanged lines hidden --- |