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

login
register
mail settings
Submitter Benjamin Herrenschmidt
Date June 17, 2009, 1:55 a.m.
Message ID <20090617015556.C3AAADDDA1@ozlabs.org>
Download mbox | patch
Permalink /patch/28753/
State Accepted
Commit 03c01aa740d4137ea2884328f2c29956c6084834
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Benjamin Herrenschmidt - June 17, 2009, 1:55 a.m.
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@kernel.crashing.org>
---

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

Patch

--- 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);