aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-06-08 19:27:53 -0400
committerJames Morris <jmorris@namei.org>2009-06-08 19:27:53 -0400
commit0b4ec6e4e01d98e55ae325a41304cccd87fa4c0f (patch)
tree1e075fdf4aaf0c5c003564b3f3414bb4a92ef2ed /drivers/misc
parent04288f42033607099cebf5ca15ce8dcec3a9688b (diff)
parent3af968e066d593bc4dacc021715f3e95ddf0996f (diff)
Merge branch 'master' into next
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/enclosure.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 3cf61ece71d7..348443bdb23b 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -119,7 +119,7 @@ enclosure_register(struct device *dev, const char *name, int components,
119 edev->edev.class = &enclosure_class; 119 edev->edev.class = &enclosure_class;
120 edev->edev.parent = get_device(dev); 120 edev->edev.parent = get_device(dev);
121 edev->cb = cb; 121 edev->cb = cb;
122 dev_set_name(&edev->edev, name); 122 dev_set_name(&edev->edev, "%s", name);
123 err = device_register(&edev->edev); 123 err = device_register(&edev->edev);
124 if (err) 124 if (err)
125 goto err; 125 goto err;
@@ -255,8 +255,8 @@ enclosure_component_register(struct enclosure_device *edev,
255 ecomp->number = number; 255 ecomp->number = number;
256 cdev = &ecomp->cdev; 256 cdev = &ecomp->cdev;
257 cdev->parent = get_device(&edev->edev); 257 cdev->parent = get_device(&edev->edev);
258 if (name) 258 if (name && name[0])
259 dev_set_name(cdev, name); 259 dev_set_name(cdev, "%s", name);
260 else 260 else
261 dev_set_name(cdev, "%u", number); 261 dev_set_name(cdev, "%u", number);
262 262