aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/attribute_container.c2
-rw-r--r--drivers/devfreq/devfreq.c2
-rw-r--r--drivers/extcon/extcon-class.c2
-rw-r--r--drivers/hsi/hsi.c2
-rw-r--r--drivers/ide/ide-cd.c2
-rw-r--r--drivers/ide/ide-gd.c2
-rw-r--r--drivers/ide/ide-probe.c4
-rw-r--r--drivers/ide/ide-tape.c2
-rw-r--r--drivers/infiniband/core/sysfs.c2
-rw-r--r--drivers/infiniband/hw/qib/qib_file_ops.c2
-rw-r--r--drivers/isdn/mISDN/dsp_pipeline.c2
-rw-r--r--drivers/mtd/mtdcore.c2
-rw-r--r--drivers/platform/x86/wmi.c2
-rw-r--r--drivers/scsi/sd.c2
-rw-r--r--drivers/staging/android/timed_output.c2
-rw-r--r--drivers/staging/dgrp/dgrp_sysfs.c2
-rw-r--r--drivers/uwb/lc-dev.c2
-rw-r--r--drivers/video/backlight/backlight.c2
-rw-r--r--drivers/video/backlight/lcd.c2
-rw-r--r--drivers/video/output.c2
-rw-r--r--drivers/xen/xenbus/xenbus_probe.c2
-rw-r--r--mm/backing-dev.c5
-rw-r--r--sound/sound_core.c2
23 files changed, 25 insertions, 26 deletions
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index d78b204e65c1..ecc1929d7f6a 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -167,7 +167,7 @@ attribute_container_add_device(struct device *dev,
167 ic->classdev.parent = get_device(dev); 167 ic->classdev.parent = get_device(dev);
168 ic->classdev.class = cont->class; 168 ic->classdev.class = cont->class;
169 cont->class->dev_release = attribute_container_release; 169 cont->class->dev_release = attribute_container_release;
170 dev_set_name(&ic->classdev, dev_name(dev)); 170 dev_set_name(&ic->classdev, "%s", dev_name(dev));
171 if (fn) 171 if (fn)
172 fn(cont, dev, &ic->classdev); 172 fn(cont, dev, &ic->classdev);
173 else 173 else
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 3b367973a802..af8372feb587 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -477,7 +477,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
477 GFP_KERNEL); 477 GFP_KERNEL);
478 devfreq->last_stat_updated = jiffies; 478 devfreq->last_stat_updated = jiffies;
479 479
480 dev_set_name(&devfreq->dev, dev_name(dev)); 480 dev_set_name(&devfreq->dev, "%s", dev_name(dev));
481 err = device_register(&devfreq->dev); 481 err = device_register(&devfreq->dev);
482 if (err) { 482 if (err) {
483 put_device(&devfreq->dev); 483 put_device(&devfreq->dev);
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
index 8c69803558fe..18ccadef43fd 100644
--- a/drivers/extcon/extcon-class.c
+++ b/drivers/extcon/extcon-class.c
@@ -602,7 +602,7 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev)
602 edev->dev->class = extcon_class; 602 edev->dev->class = extcon_class;
603 edev->dev->release = extcon_dev_release; 603 edev->dev->release = extcon_dev_release;
604 604
605 dev_set_name(edev->dev, edev->name ? edev->name : dev_name(dev)); 605 dev_set_name(edev->dev, "%s", edev->name ? edev->name : dev_name(dev));
606 606
607 if (edev->max_supported) { 607 if (edev->max_supported) {
608 char buf[10]; 608 char buf[10];
diff --git a/drivers/hsi/hsi.c b/drivers/hsi/hsi.c
index 833dd1afbf46..66d44581e1b1 100644
--- a/drivers/hsi/hsi.c
+++ b/drivers/hsi/hsi.c
@@ -75,7 +75,7 @@ static void hsi_new_client(struct hsi_port *port, struct hsi_board_info *info)
75 cl->device.bus = &hsi_bus_type; 75 cl->device.bus = &hsi_bus_type;
76 cl->device.parent = &port->device; 76 cl->device.parent = &port->device;
77 cl->device.release = hsi_client_release; 77 cl->device.release = hsi_client_release;
78 dev_set_name(&cl->device, info->name); 78 dev_set_name(&cl->device, "%s", info->name);
79 cl->device.platform_data = info->platform_data; 79 cl->device.platform_data = info->platform_data;
80 if (info->archdata) 80 if (info->archdata)
81 cl->device.archdata = *info->archdata; 81 cl->device.archdata = *info->archdata;
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 2ff620444930..0b510bafd90e 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1756,7 +1756,7 @@ static int ide_cd_probe(ide_drive_t *drive)
1756 1756
1757 info->dev.parent = &drive->gendev; 1757 info->dev.parent = &drive->gendev;
1758 info->dev.release = ide_cd_release; 1758 info->dev.release = ide_cd_release;
1759 dev_set_name(&info->dev, dev_name(&drive->gendev)); 1759 dev_set_name(&info->dev, "%s", dev_name(&drive->gendev));
1760 1760
1761 if (device_register(&info->dev)) 1761 if (device_register(&info->dev))
1762 goto out_free_disk; 1762 goto out_free_disk;
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c
index de86631e767d..838996a0039e 100644
--- a/drivers/ide/ide-gd.c
+++ b/drivers/ide/ide-gd.c
@@ -392,7 +392,7 @@ static int ide_gd_probe(ide_drive_t *drive)
392 392
393 idkp->dev.parent = &drive->gendev; 393 idkp->dev.parent = &drive->gendev;
394 idkp->dev.release = ide_disk_release; 394 idkp->dev.release = ide_disk_release;
395 dev_set_name(&idkp->dev, dev_name(&drive->gendev)); 395 dev_set_name(&idkp->dev, "%s", dev_name(&drive->gendev));
396 396
397 if (device_register(&idkp->dev)) 397 if (device_register(&idkp->dev))
398 goto out_free_disk; 398 goto out_free_disk;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 068cef0a987a..2a744a91370e 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -545,7 +545,7 @@ static int ide_register_port(ide_hwif_t *hwif)
545 int ret; 545 int ret;
546 546
547 /* register with global device tree */ 547 /* register with global device tree */
548 dev_set_name(&hwif->gendev, hwif->name); 548 dev_set_name(&hwif->gendev, "%s", hwif->name);
549 dev_set_drvdata(&hwif->gendev, hwif); 549 dev_set_drvdata(&hwif->gendev, hwif);
550 if (hwif->gendev.parent == NULL) 550 if (hwif->gendev.parent == NULL)
551 hwif->gendev.parent = hwif->dev; 551 hwif->gendev.parent = hwif->dev;
@@ -559,7 +559,7 @@ static int ide_register_port(ide_hwif_t *hwif)
559 } 559 }
560 560
561 hwif->portdev = device_create(ide_port_class, &hwif->gendev, 561 hwif->portdev = device_create(ide_port_class, &hwif->gendev,
562 MKDEV(0, 0), hwif, hwif->name); 562 MKDEV(0, 0), hwif, "%s", hwif->name);
563 if (IS_ERR(hwif->portdev)) { 563 if (IS_ERR(hwif->portdev)) {
564 ret = PTR_ERR(hwif->portdev); 564 ret = PTR_ERR(hwif->portdev);
565 device_unregister(&hwif->gendev); 565 device_unregister(&hwif->gendev);
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index c6c574bd5f59..1793aea4a7d2 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -1985,7 +1985,7 @@ static int ide_tape_probe(ide_drive_t *drive)
1985 1985
1986 tape->dev.parent = &drive->gendev; 1986 tape->dev.parent = &drive->gendev;
1987 tape->dev.release = ide_tape_release; 1987 tape->dev.release = ide_tape_release;
1988 dev_set_name(&tape->dev, dev_name(&drive->gendev)); 1988 dev_set_name(&tape->dev, "%s", dev_name(&drive->gendev));
1989 1989
1990 if (device_register(&tape->dev)) 1990 if (device_register(&tape->dev))
1991 goto out_free_disk; 1991 goto out_free_disk;
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 246fdc151652..99904f7d59e3 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -813,7 +813,7 @@ int ib_device_register_sysfs(struct ib_device *device,
813 813
814 class_dev->class = &ib_class; 814 class_dev->class = &ib_class;
815 class_dev->parent = device->dma_device; 815 class_dev->parent = device->dma_device;
816 dev_set_name(class_dev, device->name); 816 dev_set_name(class_dev, "%s", device->name);
817 dev_set_drvdata(class_dev, device); 817 dev_set_drvdata(class_dev, device);
818 818
819 INIT_LIST_HEAD(&device->port_list); 819 INIT_LIST_HEAD(&device->port_list);
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index b56c9428f3c5..9dd0bc89c3aa 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -2208,7 +2208,7 @@ int qib_cdev_init(int minor, const char *name,
2208 goto err_cdev; 2208 goto err_cdev;
2209 } 2209 }
2210 2210
2211 device = device_create(qib_class, NULL, dev, NULL, name); 2211 device = device_create(qib_class, NULL, dev, NULL, "%s", name);
2212 if (!IS_ERR(device)) 2212 if (!IS_ERR(device))
2213 goto done; 2213 goto done;
2214 ret = PTR_ERR(device); 2214 ret = PTR_ERR(device);
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c
index 88305c9cbff5..8b1a66c6ca8a 100644
--- a/drivers/isdn/mISDN/dsp_pipeline.c
+++ b/drivers/isdn/mISDN/dsp_pipeline.c
@@ -102,7 +102,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)
102 entry->dev.class = elements_class; 102 entry->dev.class = elements_class;
103 entry->dev.release = mISDN_dsp_dev_release; 103 entry->dev.release = mISDN_dsp_dev_release;
104 dev_set_drvdata(&entry->dev, elem); 104 dev_set_drvdata(&entry->dev, elem);
105 dev_set_name(&entry->dev, elem->name); 105 dev_set_name(&entry->dev, "%s", elem->name);
106 ret = device_register(&entry->dev); 106 ret = device_register(&entry->dev);
107 if (ret) { 107 if (ret) {
108 printk(KERN_ERR "%s: failed to register %s\n", 108 printk(KERN_ERR "%s: failed to register %s\n",
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index c400c57c394a..048c823f5c51 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1151,7 +1151,7 @@ static int __init mtd_bdi_init(struct backing_dev_info *bdi, const char *name)
1151 1151
1152 ret = bdi_init(bdi); 1152 ret = bdi_init(bdi);
1153 if (!ret) 1153 if (!ret)
1154 ret = bdi_register(bdi, NULL, name); 1154 ret = bdi_register(bdi, NULL, "%s", name);
1155 1155
1156 if (ret) 1156 if (ret)
1157 bdi_destroy(bdi); 1157 bdi_destroy(bdi);
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index e4ac38aca580..b13344c59808 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -743,7 +743,7 @@ static int wmi_create_device(const struct guid_block *gblock,
743 wblock->dev.class = &wmi_class; 743 wblock->dev.class = &wmi_class;
744 744
745 wmi_gtoa(gblock->guid, guid_string); 745 wmi_gtoa(gblock->guid, guid_string);
746 dev_set_name(&wblock->dev, guid_string); 746 dev_set_name(&wblock->dev, "%s", guid_string);
747 747
748 dev_set_drvdata(&wblock->dev, wblock); 748 dev_set_drvdata(&wblock->dev, wblock);
749 749
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index c1c555242d0d..8fa3d0b73ad9 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2931,7 +2931,7 @@ static int sd_probe(struct device *dev)
2931 device_initialize(&sdkp->dev); 2931 device_initialize(&sdkp->dev);
2932 sdkp->dev.parent = dev; 2932 sdkp->dev.parent = dev;
2933 sdkp->dev.class = &sd_disk_class; 2933 sdkp->dev.class = &sd_disk_class;
2934 dev_set_name(&sdkp->dev, dev_name(dev)); 2934 dev_set_name(&sdkp->dev, "%s", dev_name(dev));
2935 2935
2936 if (device_add(&sdkp->dev)) 2936 if (device_add(&sdkp->dev))
2937 goto out_free_index; 2937 goto out_free_index;
diff --git a/drivers/staging/android/timed_output.c b/drivers/staging/android/timed_output.c
index ec9e2ae2de0d..ee3a57f22832 100644
--- a/drivers/staging/android/timed_output.c
+++ b/drivers/staging/android/timed_output.c
@@ -78,7 +78,7 @@ int timed_output_dev_register(struct timed_output_dev *tdev)
78 78
79 tdev->index = atomic_inc_return(&device_count); 79 tdev->index = atomic_inc_return(&device_count);
80 tdev->dev = device_create(timed_output_class, NULL, 80 tdev->dev = device_create(timed_output_class, NULL,
81 MKDEV(0, tdev->index), NULL, tdev->name); 81 MKDEV(0, tdev->index), NULL, "%s", tdev->name);
82 if (IS_ERR(tdev->dev)) 82 if (IS_ERR(tdev->dev))
83 return PTR_ERR(tdev->dev); 83 return PTR_ERR(tdev->dev);
84 84
diff --git a/drivers/staging/dgrp/dgrp_sysfs.c b/drivers/staging/dgrp/dgrp_sysfs.c
index 7d1b36d1e75f..8cee9c8bc38b 100644
--- a/drivers/staging/dgrp/dgrp_sysfs.c
+++ b/drivers/staging/dgrp/dgrp_sysfs.c
@@ -273,7 +273,7 @@ void dgrp_create_node_class_sysfs_files(struct nd_struct *nd)
273 sprintf(name, "node%ld", nd->nd_major); 273 sprintf(name, "node%ld", nd->nd_major);
274 274
275 nd->nd_class_dev = device_create(dgrp_class, dgrp_class_nodes_dev, 275 nd->nd_class_dev = device_create(dgrp_class, dgrp_class_nodes_dev,
276 MKDEV(0, nd->nd_major), NULL, name); 276 MKDEV(0, nd->nd_major), NULL, "%s", name);
277 277
278 ret = sysfs_create_group(&nd->nd_class_dev->kobj, 278 ret = sysfs_create_group(&nd->nd_class_dev->kobj,
279 &dgrp_node_attribute_group); 279 &dgrp_node_attribute_group);
diff --git a/drivers/uwb/lc-dev.c b/drivers/uwb/lc-dev.c
index 5241f1d0ef7a..9209eafc75b1 100644
--- a/drivers/uwb/lc-dev.c
+++ b/drivers/uwb/lc-dev.c
@@ -440,7 +440,7 @@ void uwbd_dev_onair(struct uwb_rc *rc, struct uwb_beca_e *bce)
440 uwb_dev_init(uwb_dev); /* This sets refcnt to one, we own it */ 440 uwb_dev_init(uwb_dev); /* This sets refcnt to one, we own it */
441 uwb_dev->mac_addr = *bce->mac_addr; 441 uwb_dev->mac_addr = *bce->mac_addr;
442 uwb_dev->dev_addr = bce->dev_addr; 442 uwb_dev->dev_addr = bce->dev_addr;
443 dev_set_name(&uwb_dev->dev, macbuf); 443 dev_set_name(&uwb_dev->dev, "%s", macbuf);
444 result = uwb_dev_add(uwb_dev, &rc->uwb_dev.dev, rc); 444 result = uwb_dev_add(uwb_dev, &rc->uwb_dev.dev, rc);
445 if (result < 0) { 445 if (result < 0) {
446 dev_err(dev, "new device %s: cannot instantiate device\n", 446 dev_err(dev, "new device %s: cannot instantiate device\n",
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index c74e7aa46731..e3c279083253 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -304,7 +304,7 @@ struct backlight_device *backlight_device_register(const char *name,
304 new_bd->dev.class = backlight_class; 304 new_bd->dev.class = backlight_class;
305 new_bd->dev.parent = parent; 305 new_bd->dev.parent = parent;
306 new_bd->dev.release = bl_device_release; 306 new_bd->dev.release = bl_device_release;
307 dev_set_name(&new_bd->dev, name); 307 dev_set_name(&new_bd->dev, "%s", name);
308 dev_set_drvdata(&new_bd->dev, devdata); 308 dev_set_drvdata(&new_bd->dev, devdata);
309 309
310 /* Set default properties */ 310 /* Set default properties */
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index 34fb6bd798c8..3649fd9ddb3a 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -219,7 +219,7 @@ struct lcd_device *lcd_device_register(const char *name, struct device *parent,
219 new_ld->dev.class = lcd_class; 219 new_ld->dev.class = lcd_class;
220 new_ld->dev.parent = parent; 220 new_ld->dev.parent = parent;
221 new_ld->dev.release = lcd_device_release; 221 new_ld->dev.release = lcd_device_release;
222 dev_set_name(&new_ld->dev, name); 222 dev_set_name(&new_ld->dev, "%s", name);
223 dev_set_drvdata(&new_ld->dev, devdata); 223 dev_set_drvdata(&new_ld->dev, devdata);
224 224
225 rc = device_register(&new_ld->dev); 225 rc = device_register(&new_ld->dev);
diff --git a/drivers/video/output.c b/drivers/video/output.c
index 0d6f2cda9369..6285b9718451 100644
--- a/drivers/video/output.c
+++ b/drivers/video/output.c
@@ -97,7 +97,7 @@ struct output_device *video_output_register(const char *name,
97 new_dev->props = op; 97 new_dev->props = op;
98 new_dev->dev.class = &video_output_class; 98 new_dev->dev.class = &video_output_class;
99 new_dev->dev.parent = dev; 99 new_dev->dev.parent = dev;
100 dev_set_name(&new_dev->dev, name); 100 dev_set_name(&new_dev->dev, "%s", name);
101 dev_set_drvdata(&new_dev->dev, devdata); 101 dev_set_drvdata(&new_dev->dev, devdata);
102 ret_code = device_register(&new_dev->dev); 102 ret_code = device_register(&new_dev->dev);
103 if (ret_code) { 103 if (ret_code) {
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 56cfaaa9d006..8c9db16500e3 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -447,7 +447,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,
447 if (err) 447 if (err)
448 goto fail; 448 goto fail;
449 449
450 dev_set_name(&xendev->dev, devname); 450 dev_set_name(&xendev->dev, "%s", devname);
451 451
452 /* Register with generic device framework. */ 452 /* Register with generic device framework. */
453 err = device_register(&xendev->dev); 453 err = device_register(&xendev->dev);
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 502517492258..d014ee5fcbbd 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -515,7 +515,6 @@ EXPORT_SYMBOL(bdi_destroy);
515int bdi_setup_and_register(struct backing_dev_info *bdi, char *name, 515int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
516 unsigned int cap) 516 unsigned int cap)
517{ 517{
518 char tmp[32];
519 int err; 518 int err;
520 519
521 bdi->name = name; 520 bdi->name = name;
@@ -524,8 +523,8 @@ int bdi_setup_and_register(struct backing_dev_info *bdi, char *name,
524 if (err) 523 if (err)
525 return err; 524 return err;
526 525
527 sprintf(tmp, "%.28s%s", name, "-%d"); 526 err = bdi_register(bdi, NULL, "%.28s-%ld", name,
528 err = bdi_register(bdi, NULL, tmp, atomic_long_inc_return(&bdi_seq)); 527 atomic_long_inc_return(&bdi_seq));
529 if (err) { 528 if (err) {
530 bdi_destroy(bdi); 529 bdi_destroy(bdi);
531 return err; 530 return err;
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 359753fc24e1..45759f4cca75 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -292,7 +292,7 @@ retry:
292 } 292 }
293 293
294 device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor), 294 device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor),
295 NULL, s->name+6); 295 NULL, "%s", s->name+6);
296 return s->unit_minor; 296 return s->unit_minor;
297 297
298fail: 298fail: