Thread (18 messages) 18 messages, 6 authors, 2014-08-29

Re: [PATCH] mmc: dw_mmc: move rockchip related code to a separate file

From: Heiko Stübner <heiko@sntech.de>
Date: 2014-08-15 19:52:32

Am Donnerstag, 14. August 2014, 10:09:55 schrieb Doug Anderson:
Addy,

On Thu, Aug 14, 2014 at 1:01 AM, Addy Ke [off-list ref] wrote:
quoted
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c
b/drivers/mmc/host/dw_mmc-rockchip.c new file mode 100644
index 0000000..3d86ef3
--- /dev/null
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
[...]
quoted
+static int dw_mci_rockchip_probe(struct platform_device *pdev)
+{
+       const struct dw_mci_drv_data *drv_data;
+       const struct of_device_id *match;
+
+       match = of_match_node(dw_mci_rockchip_match, pdev->dev.of_node);
Your code doesn't have "if (pdev->dev.of_node)".  That's OK (I think)
but it means that your KConfig needs a "depends on OF", right?
Almost all of_* functions have stubs for the !CONFIG_OF case [0].
Instead I guess this simply needs a

if (!pdev->dev.of_node)
	return -ENODEV;

to handle the case when there is no of_node.


Heiko


[0] http://lxr.free-electrons.com/source/include/linux/of.h#L585
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help