aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-06-02 18:39:55 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:25 -0400
commitacc0e90fbccbc6e4d48184cba0983ea044e131af (patch)
tree5dee80c06dcb97739f6fae7e397fa8f4a4f8ee25 /drivers/base
parentd12b77afb4f0a06e9c7e82a0e88d5f011b862c10 (diff)
driver core: fix gcc 4.3.3 warnings about string literals
This removes the warning: format not a string literal and no format arguments warnings in the driver core that gcc 4.3.3 complains about. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c4
-rw-r--r--drivers/base/firmware_class.c2
-rw-r--r--drivers/base/platform.c2
-rw-r--r--drivers/base/sys.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7e8576d7822d..4d59975c24a8 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -875,7 +875,7 @@ int device_add(struct device *dev)
875 * the name, and force the use of dev_name() 875 * the name, and force the use of dev_name()
876 */ 876 */
877 if (dev->init_name) { 877 if (dev->init_name) {
878 dev_set_name(dev, dev->init_name); 878 dev_set_name(dev, "%s", dev->init_name);
879 dev->init_name = NULL; 879 dev->init_name = NULL;
880 } 880 }
881 881
@@ -1272,7 +1272,7 @@ struct device *__root_device_register(const char *name, struct module *owner)
1272 if (!root) 1272 if (!root)
1273 return ERR_PTR(err); 1273 return ERR_PTR(err);
1274 1274
1275 err = dev_set_name(&root->dev, name); 1275 err = dev_set_name(&root->dev, "%s", name);
1276 if (err) { 1276 if (err) {
1277 kfree(root); 1277 kfree(root);
1278 return ERR_PTR(err); 1278 return ERR_PTR(err);
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 3591ba7ff6f7..ddeb819c8f87 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -399,7 +399,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
399 fw_priv->timeout.data = (u_long) fw_priv; 399 fw_priv->timeout.data = (u_long) fw_priv;
400 init_timer(&fw_priv->timeout); 400 init_timer(&fw_priv->timeout);
401 401
402 dev_set_name(f_dev, dev_name(device)); 402 dev_set_name(f_dev, "%s", dev_name(device));
403 f_dev->parent = device; 403 f_dev->parent = device;
404 f_dev->class = &firmware_class; 404 f_dev->class = &firmware_class;
405 dev_set_drvdata(f_dev, fw_priv); 405 dev_set_drvdata(f_dev, fw_priv);
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 59df6290951b..81cb01bfc356 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -245,7 +245,7 @@ int platform_device_add(struct platform_device *pdev)
245 if (pdev->id != -1) 245 if (pdev->id != -1)
246 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id); 246 dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
247 else 247 else
248 dev_set_name(&pdev->dev, pdev->name); 248 dev_set_name(&pdev->dev, "%s", pdev->name);
249 249
250 for (i = 0; i < pdev->num_resources; i++) { 250 for (i = 0; i < pdev->num_resources; i++) {
251 struct resource *p, *r = &pdev->resource[i]; 251 struct resource *p, *r = &pdev->resource[i];
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 162355cd745a..79a9ae5238ac 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -141,7 +141,7 @@ int sysdev_class_register(struct sysdev_class *cls)
141 cls->kset.kobj.ktype = &ktype_sysdev_class; 141 cls->kset.kobj.ktype = &ktype_sysdev_class;
142 cls->kset.kobj.kset = system_kset; 142 cls->kset.kobj.kset = system_kset;
143 143
144 retval = kobject_set_name(&cls->kset.kobj, cls->name); 144 retval = kobject_set_name(&cls->kset.kobj, "%s", cls->name);
145 if (retval) 145 if (retval)
146 return retval; 146 return retval;
147 147