Skip to contentSkip to conversation

bus: tegra-gmi: fix build error

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 8, 2016 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bus: tegra-gmi: fix build error

The newly added driver fails to build right away:

drivers/bus/tegra-gmi.c: In function 'tegra_gmi_parse_dt':
drivers/bus/tegra-gmi.c:97:11: error: 'dev' undeclared (first use in this function)

I guess a last-minute change removed a local variable, this adds the obvious definiton.

Fixes 4f95e6a5c9e4 ("bus: Add support for Tegra Generic Memory Interface")
---
 drivers/bus/tegra-gmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bus/tegra-gmi.c +2 -1
index 44ee73186c5e..8b6ab0dd2f4c 100644
@@ -90,9 +90,10 @@ static int tegra_gmi_parse_dt(struct tegra_gmi *gmi)
 {
 	struct device_node *child;
 	u32 property, ranges[4];
+	struct device *dev = gmi->dev;
 	int err;
 
-	child = of_get_next_available_child(gmi->dev->of_node, NULL);
+	child = of_get_next_available_child(dev->of_node, NULL);
 	if (!child) {
 		dev_err(dev, "no child nodes found\n");
 		return -ENODEV;
Signature · 1 line
2.9.0
#1 lore raw
Quoted 5 lines · Arnd Bergmann

The newly added driver fails to build right away:

drivers/bus/tegra-gmi.c: In function 'tegra_gmi_parse_dt':
drivers/bus/tegra-gmi.c:97:11: error: 'dev' undeclared (first use in this function)

Quoted 8 lines

I guess a last-minute change removed a local variable, this adds the obvious definiton.

Fixes 4f95e6a5c9e4 ("bus: Add support for Tegra Generic Memory Interface")
---
 drivers/bus/tegra-gmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

This got reported by the 0-day builder earlier. Turns out this slipped through because my build setup failed to pick up the new configuration option. I pushed a fix for this to the Tegra tree, so it should all be good by tomorrow.

Thanks,
Thierry