powerpc/of: Fix usage of dev_set_name() in of_device_alloc()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 16 Jun 2009 15:55:18 +0000 (15:55 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 26 Jun 2009 06:55:35 +0000 (16:55 +1000)
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

index fa983a59c4ce1084d939da4ea6fce17d91036f2a..a359cb08e9006168a60ba87b9e34df0c02256d51 100644 (file)
@@ -76,7 +76,7 @@ struct of_device *of_device_alloc(struct device_node *np,
        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);