Skip to contentSkip to conversation

powerpc/of: Fix usage of dev_set_name() in of_device_alloc()

PATCH New Benjamin Herrenschmidt 1 participant 1 message Jun 17, 2009 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 powerpc/of: Fix usage of dev_set_name() in of_device_alloc()

dev_set_name() takes a format string, so use it properly and avoid a warning with recent gcc's

---

 arch/powerpc/kernel/of_device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/of_device.c +1 -1
@@ -76,7 +76,7 @@ struct of_device *of_device_alloc(struct
 	dev->dev.archdata.of_node = np;
 
 	if (bus_id)
-		dev_set_name(&dev->dev, bus_id);
+		dev_set_name(&dev->dev, "%s", bus_id);
 	else
 		of_device_make_bus_id(dev);