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

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jun 17 11:55:18 EST 2009


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

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---

 arch/powerpc/kernel/of_device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-work.orig/arch/powerpc/kernel/of_device.c	2009-06-17 11:34:54.000000000 +1000
+++ linux-work/arch/powerpc/kernel/of_device.c	2009-06-17 11:35:04.000000000 +1000
@@ -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);
 


More information about the Linuxppc-dev mailing list