Re: [PATCH v6 6/9] mmc: dw_mmc: add device tree support
From: Jaehoon Chung <jh80.chung@samsung.com>
Date: 2012-09-21 02:43:06
Also in:
linux-mmc, linux-samsung-soc
quoted
quoted
quoted
+#else /* CONFIG_OF */ +static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host) +{ + return ERR_PTR(-EINVAL); +} +#endif /* CONFIG_OF */ + int dw_mci_probe(struct dw_mci *host) { int width, i, ret = 0; u32 fifo_size; int init_slots = 0; - if (!host->pdata || !host->pdata->init) {"!host->pdata->init" is removed. Please check it.I have checked again in mmc-next branch and "init" is still there.I mean that there is no condition whether "host->pdata->init" is present or not, unlike origin code. In this patch this condition is removed. We don't need it anymore?
Actually i didn't know why need the pdata->init. Why need host->pdata->init? In case of exynos, just return 1. I didn't know how use this at other-soc. Best Regards, Jaehoon Chung
quoted
Thanks, Thomas.quoted
Thanks, Seungwon Jeonquoted
- dev_err(host->dev, - "Platform data must supply init function\n"); - return -ENODEV; + if (!host->pdata) { + host->pdata = dw_mci_parse_dt(host); + if (IS_ERR(host->pdata)) { + dev_err(host->dev, "platform data not available\n"); + return -EINVAL; + } } if (!host->pdata->select_slot && host->pdata->num_slots > 1) { -- 1.6.6.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html[...] -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html