aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-04 19:41:05 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:29 -0400
commit2b3a302a09735276e13421db56c20045a48eb06d (patch)
tree77af4f2f378d92d7b61727a38501feed3365e57f
parent2424b5dd062cbe3e0578ae7b11a1b360ad22f451 (diff)
driver core: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/base/bus.c8
-rw-r--r--drivers/base/class.c8
-rw-r--r--drivers/base/core.c18
-rw-r--r--drivers/base/dd.c14
-rw-r--r--drivers/base/firmware_class.c18
-rw-r--r--drivers/base/memory.c4
-rw-r--r--drivers/base/sys.c2
7 files changed, 36 insertions, 36 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 450942acca1a..be1cc5143354 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -79,7 +79,7 @@ static void driver_release(struct kobject *kobj)
79{ 79{
80 struct driver_private *drv_priv = to_driver(kobj); 80 struct driver_private *drv_priv = to_driver(kobj);
81 81
82 pr_debug("driver: '%s': %s\n", kobject_name(kobj), __FUNCTION__); 82 pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__);
83 kfree(drv_priv); 83 kfree(drv_priv);
84} 84}
85 85
@@ -677,19 +677,19 @@ int bus_add_driver(struct device_driver *drv)
677 error = driver_create_file(drv, &driver_attr_uevent); 677 error = driver_create_file(drv, &driver_attr_uevent);
678 if (error) { 678 if (error) {
679 printk(KERN_ERR "%s: uevent attr (%s) failed\n", 679 printk(KERN_ERR "%s: uevent attr (%s) failed\n",
680 __FUNCTION__, drv->name); 680 __func__, drv->name);
681 } 681 }
682 error = driver_add_attrs(bus, drv); 682 error = driver_add_attrs(bus, drv);
683 if (error) { 683 if (error) {
684 /* How the hell do we get out of this pickle? Give up */ 684 /* How the hell do we get out of this pickle? Give up */
685 printk(KERN_ERR "%s: driver_add_attrs(%s) failed\n", 685 printk(KERN_ERR "%s: driver_add_attrs(%s) failed\n",
686 __FUNCTION__, drv->name); 686 __func__, drv->name);
687 } 687 }
688 error = add_bind_files(drv); 688 error = add_bind_files(drv);
689 if (error) { 689 if (error) {
690 /* Ditto */ 690 /* Ditto */
691 printk(KERN_ERR "%s: add_bind_files(%s) failed\n", 691 printk(KERN_ERR "%s: add_bind_files(%s) failed\n",
692 __FUNCTION__, drv->name); 692 __func__, drv->name);
693 } 693 }
694 694
695 kobject_uevent(&priv->kobj, KOBJ_ADD); 695 kobject_uevent(&priv->kobj, KOBJ_ADD);
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 9d915376c313..b4901799308b 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -175,13 +175,13 @@ void class_unregister(struct class *cls)
175 175
176static void class_create_release(struct class *cls) 176static void class_create_release(struct class *cls)
177{ 177{
178 pr_debug("%s called for %s\n", __FUNCTION__, cls->name); 178 pr_debug("%s called for %s\n", __func__, cls->name);
179 kfree(cls); 179 kfree(cls);
180} 180}
181 181
182static void class_device_create_release(struct class_device *class_dev) 182static void class_device_create_release(struct class_device *class_dev)
183{ 183{
184 pr_debug("%s called for %s\n", __FUNCTION__, class_dev->class_id); 184 pr_debug("%s called for %s\n", __func__, class_dev->class_id);
185 kfree(class_dev); 185 kfree(class_dev);
186} 186}
187 187
@@ -189,7 +189,7 @@ static void class_device_create_release(struct class_device *class_dev)
189static int class_device_create_uevent(struct class_device *class_dev, 189static int class_device_create_uevent(struct class_device *class_dev,
190 struct kobj_uevent_env *env) 190 struct kobj_uevent_env *env)
191{ 191{
192 pr_debug("%s called for %s\n", __FUNCTION__, class_dev->class_id); 192 pr_debug("%s called for %s\n", __func__, class_dev->class_id);
193 return 0; 193 return 0;
194} 194}
195 195
@@ -415,7 +415,7 @@ static int class_uevent(struct kset *kset, struct kobject *kobj,
415 struct device *dev = class_dev->dev; 415 struct device *dev = class_dev->dev;
416 int retval = 0; 416 int retval = 0;
417 417
418 pr_debug("%s - name = %s\n", __FUNCTION__, class_dev->class_id); 418 pr_debug("%s - name = %s\n", __func__, class_dev->class_id);
419 419
420 if (MAJOR(class_dev->devt)) { 420 if (MAJOR(class_dev->devt)) {
421 add_uevent_var(env, "MAJOR=%u", MAJOR(class_dev->devt)); 421 add_uevent_var(env, "MAJOR=%u", MAJOR(class_dev->devt));
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 0262fc7c45fc..0737fe5392a3 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -207,7 +207,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
207 retval = dev->bus->uevent(dev, env); 207 retval = dev->bus->uevent(dev, env);
208 if (retval) 208 if (retval)
209 pr_debug("device: '%s': %s: bus uevent() returned %d\n", 209 pr_debug("device: '%s': %s: bus uevent() returned %d\n",
210 dev->bus_id, __FUNCTION__, retval); 210 dev->bus_id, __func__, retval);
211 } 211 }
212 212
213 /* have the class specific function add its stuff */ 213 /* have the class specific function add its stuff */
@@ -216,7 +216,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
216 if (retval) 216 if (retval)
217 pr_debug("device: '%s': %s: class uevent() " 217 pr_debug("device: '%s': %s: class uevent() "
218 "returned %d\n", dev->bus_id, 218 "returned %d\n", dev->bus_id,
219 __FUNCTION__, retval); 219 __func__, retval);
220 } 220 }
221 221
222 /* have the device type specific fuction add its stuff */ 222 /* have the device type specific fuction add its stuff */
@@ -225,7 +225,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
225 if (retval) 225 if (retval)
226 pr_debug("device: '%s': %s: dev_type uevent() " 226 pr_debug("device: '%s': %s: dev_type uevent() "
227 "returned %d\n", dev->bus_id, 227 "returned %d\n", dev->bus_id,
228 __FUNCTION__, retval); 228 __func__, retval);
229 } 229 }
230 230
231 return retval; 231 return retval;
@@ -782,7 +782,7 @@ int device_add(struct device *dev)
782 goto Done; 782 goto Done;
783 } 783 }
784 784
785 pr_debug("device: '%s': %s\n", dev->bus_id, __FUNCTION__); 785 pr_debug("device: '%s': %s\n", dev->bus_id, __func__);
786 786
787 parent = get_device(dev->parent); 787 parent = get_device(dev->parent);
788 setup_parent(dev, parent); 788 setup_parent(dev, parent);
@@ -980,7 +980,7 @@ void device_del(struct device *dev)
980 */ 980 */
981void device_unregister(struct device *dev) 981void device_unregister(struct device *dev)
982{ 982{
983 pr_debug("device: '%s': %s\n", dev->bus_id, __FUNCTION__); 983 pr_debug("device: '%s': %s\n", dev->bus_id, __func__);
984 device_del(dev); 984 device_del(dev);
985 put_device(dev); 985 put_device(dev);
986} 986}
@@ -1075,7 +1075,7 @@ EXPORT_SYMBOL_GPL(device_remove_file);
1075 1075
1076static void device_create_release(struct device *dev) 1076static void device_create_release(struct device *dev)
1077{ 1077{
1078 pr_debug("device: '%s': %s\n", dev->bus_id, __FUNCTION__); 1078 pr_debug("device: '%s': %s\n", dev->bus_id, __func__);
1079 kfree(dev); 1079 kfree(dev);
1080} 1080}
1081 1081
@@ -1180,7 +1180,7 @@ int device_rename(struct device *dev, char *new_name)
1180 return -EINVAL; 1180 return -EINVAL;
1181 1181
1182 pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id, 1182 pr_debug("device: '%s': %s: renaming to '%s'\n", dev->bus_id,
1183 __FUNCTION__, new_name); 1183 __func__, new_name);
1184 1184
1185#ifdef CONFIG_SYSFS_DEPRECATED 1185#ifdef CONFIG_SYSFS_DEPRECATED
1186 if ((dev->class) && (dev->parent)) 1186 if ((dev->class) && (dev->parent))
@@ -1219,7 +1219,7 @@ int device_rename(struct device *dev, char *new_name)
1219 dev->bus_id); 1219 dev->bus_id);
1220 if (error) { 1220 if (error) {
1221 dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n", 1221 dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
1222 __FUNCTION__, error); 1222 __func__, error);
1223 } 1223 }
1224 } 1224 }
1225#endif 1225#endif
@@ -1295,7 +1295,7 @@ int device_move(struct device *dev, struct device *new_parent)
1295 new_parent_kobj = get_device_parent(dev, new_parent); 1295 new_parent_kobj = get_device_parent(dev, new_parent);
1296 1296
1297 pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id, 1297 pr_debug("device: '%s': %s: moving to '%s'\n", dev->bus_id,
1298 __FUNCTION__, new_parent ? new_parent->bus_id : "<NULL>"); 1298 __func__, new_parent ? new_parent->bus_id : "<NULL>");
1299 error = kobject_move(&dev->kobj, new_parent_kobj); 1299 error = kobject_move(&dev->kobj, new_parent_kobj);
1300 if (error) { 1300 if (error) {
1301 cleanup_glue_dir(dev, new_parent_kobj); 1301 cleanup_glue_dir(dev, new_parent_kobj);
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index a5cde94bb982..3ac443b2ac08 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -30,12 +30,12 @@ static void driver_bound(struct device *dev)
30{ 30{
31 if (klist_node_attached(&dev->knode_driver)) { 31 if (klist_node_attached(&dev->knode_driver)) {
32 printk(KERN_WARNING "%s: device %s already bound\n", 32 printk(KERN_WARNING "%s: device %s already bound\n",
33 __FUNCTION__, kobject_name(&dev->kobj)); 33 __func__, kobject_name(&dev->kobj));
34 return; 34 return;
35 } 35 }
36 36
37 pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->bus_id, 37 pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->bus_id,
38 __FUNCTION__, dev->driver->name); 38 __func__, dev->driver->name);
39 39
40 if (dev->bus) 40 if (dev->bus)
41 blocking_notifier_call_chain(&dev->bus->p->bus_notifier, 41 blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
@@ -104,13 +104,13 @@ static int really_probe(struct device *dev, struct device_driver *drv)
104 104
105 atomic_inc(&probe_count); 105 atomic_inc(&probe_count);
106 pr_debug("bus: '%s': %s: probing driver %s with device %s\n", 106 pr_debug("bus: '%s': %s: probing driver %s with device %s\n",
107 drv->bus->name, __FUNCTION__, drv->name, dev->bus_id); 107 drv->bus->name, __func__, drv->name, dev->bus_id);
108 WARN_ON(!list_empty(&dev->devres_head)); 108 WARN_ON(!list_empty(&dev->devres_head));
109 109
110 dev->driver = drv; 110 dev->driver = drv;
111 if (driver_sysfs_add(dev)) { 111 if (driver_sysfs_add(dev)) {
112 printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n", 112 printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
113 __FUNCTION__, dev->bus_id); 113 __func__, dev->bus_id);
114 goto probe_failed; 114 goto probe_failed;
115 } 115 }
116 116
@@ -127,7 +127,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
127 driver_bound(dev); 127 driver_bound(dev);
128 ret = 1; 128 ret = 1;
129 pr_debug("bus: '%s': %s: bound device %s to driver %s\n", 129 pr_debug("bus: '%s': %s: bound device %s to driver %s\n",
130 drv->bus->name, __FUNCTION__, dev->bus_id, drv->name); 130 drv->bus->name, __func__, dev->bus_id, drv->name);
131 goto done; 131 goto done;
132 132
133probe_failed: 133probe_failed:
@@ -160,7 +160,7 @@ done:
160 */ 160 */
161int driver_probe_done(void) 161int driver_probe_done(void)
162{ 162{
163 pr_debug("%s: probe_count = %d\n", __FUNCTION__, 163 pr_debug("%s: probe_count = %d\n", __func__,
164 atomic_read(&probe_count)); 164 atomic_read(&probe_count));
165 if (atomic_read(&probe_count)) 165 if (atomic_read(&probe_count))
166 return -EBUSY; 166 return -EBUSY;
@@ -194,7 +194,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev)
194 goto done; 194 goto done;
195 195
196 pr_debug("bus: '%s': %s: matched device %s with driver %s\n", 196 pr_debug("bus: '%s': %s: matched device %s with driver %s\n",
197 drv->bus->name, __FUNCTION__, dev->bus_id, drv->name); 197 drv->bus->name, __func__, dev->bus_id, drv->name);
198 198
199 ret = really_probe(dev, drv); 199 ret = really_probe(dev, drv);
200 200
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 4a1b9bfc5471..1fef7df8c9d6 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -156,7 +156,7 @@ static ssize_t firmware_loading_store(struct device *dev,
156 } 156 }
157 /* fallthrough */ 157 /* fallthrough */
158 default: 158 default:
159 printk(KERN_ERR "%s: unexpected value (%d)\n", __FUNCTION__, 159 printk(KERN_ERR "%s: unexpected value (%d)\n", __func__,
160 loading); 160 loading);
161 /* fallthrough */ 161 /* fallthrough */
162 case -1: 162 case -1:
@@ -209,7 +209,7 @@ fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size)
209 new_size = ALIGN(min_size, PAGE_SIZE); 209 new_size = ALIGN(min_size, PAGE_SIZE);
210 new_data = vmalloc(new_size); 210 new_data = vmalloc(new_size);
211 if (!new_data) { 211 if (!new_data) {
212 printk(KERN_ERR "%s: unable to alloc buffer\n", __FUNCTION__); 212 printk(KERN_ERR "%s: unable to alloc buffer\n", __func__);
213 /* Make sure that we don't keep incomplete data */ 213 /* Make sure that we don't keep incomplete data */
214 fw_load_abort(fw_priv); 214 fw_load_abort(fw_priv);
215 return -ENOMEM; 215 return -ENOMEM;
@@ -307,7 +307,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
307 *dev_p = NULL; 307 *dev_p = NULL;
308 308
309 if (!fw_priv || !f_dev) { 309 if (!fw_priv || !f_dev) {
310 printk(KERN_ERR "%s: kmalloc failed\n", __FUNCTION__); 310 printk(KERN_ERR "%s: kmalloc failed\n", __func__);
311 retval = -ENOMEM; 311 retval = -ENOMEM;
312 goto error_kfree; 312 goto error_kfree;
313 } 313 }
@@ -328,7 +328,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
328 retval = device_register(f_dev); 328 retval = device_register(f_dev);
329 if (retval) { 329 if (retval) {
330 printk(KERN_ERR "%s: device_register failed\n", 330 printk(KERN_ERR "%s: device_register failed\n",
331 __FUNCTION__); 331 __func__);
332 goto error_kfree; 332 goto error_kfree;
333 } 333 }
334 *dev_p = f_dev; 334 *dev_p = f_dev;
@@ -362,14 +362,14 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p,
362 retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data); 362 retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data);
363 if (retval) { 363 if (retval) {
364 printk(KERN_ERR "%s: sysfs_create_bin_file failed\n", 364 printk(KERN_ERR "%s: sysfs_create_bin_file failed\n",
365 __FUNCTION__); 365 __func__);
366 goto error_unreg; 366 goto error_unreg;
367 } 367 }
368 368
369 retval = device_create_file(f_dev, &dev_attr_loading); 369 retval = device_create_file(f_dev, &dev_attr_loading);
370 if (retval) { 370 if (retval) {
371 printk(KERN_ERR "%s: device_create_file failed\n", 371 printk(KERN_ERR "%s: device_create_file failed\n",
372 __FUNCTION__); 372 __func__);
373 goto error_unreg; 373 goto error_unreg;
374 } 374 }
375 375
@@ -399,7 +399,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
399 *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL); 399 *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
400 if (!firmware) { 400 if (!firmware) {
401 printk(KERN_ERR "%s: kmalloc(struct firmware) failed\n", 401 printk(KERN_ERR "%s: kmalloc(struct firmware) failed\n",
402 __FUNCTION__); 402 __func__);
403 retval = -ENOMEM; 403 retval = -ENOMEM;
404 goto out; 404 goto out;
405 } 405 }
@@ -570,13 +570,13 @@ firmware_class_init(void)
570 int error; 570 int error;
571 error = class_register(&firmware_class); 571 error = class_register(&firmware_class);
572 if (error) { 572 if (error) {
573 printk(KERN_ERR "%s: class_register failed\n", __FUNCTION__); 573 printk(KERN_ERR "%s: class_register failed\n", __func__);
574 return error; 574 return error;
575 } 575 }
576 error = class_create_file(&firmware_class, &class_attr_timeout); 576 error = class_create_file(&firmware_class, &class_attr_timeout);
577 if (error) { 577 if (error) {
578 printk(KERN_ERR "%s: class_create_file failed\n", 578 printk(KERN_ERR "%s: class_create_file failed\n",
579 __FUNCTION__); 579 __func__);
580 class_unregister(&firmware_class); 580 class_unregister(&firmware_class);
581 } 581 }
582 return error; 582 return error;
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 7891f7c97267..8ce6de5a7e28 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -186,7 +186,7 @@ memory_block_action(struct memory_block *mem, unsigned long action)
186 break; 186 break;
187 default: 187 default:
188 printk(KERN_WARNING "%s(%p, %ld) unknown action: %ld\n", 188 printk(KERN_WARNING "%s(%p, %ld) unknown action: %ld\n",
189 __FUNCTION__, mem, action, action); 189 __func__, mem, action, action);
190 WARN_ON(1); 190 WARN_ON(1);
191 ret = -EINVAL; 191 ret = -EINVAL;
192 } 192 }
@@ -444,6 +444,6 @@ int __init memory_dev_init(void)
444 ret = err; 444 ret = err;
445out: 445out:
446 if (ret) 446 if (ret)
447 printk(KERN_ERR "%s() failed: %d\n", __FUNCTION__, ret); 447 printk(KERN_ERR "%s() failed: %d\n", __func__, ret);
448 return ret; 448 return ret;
449} 449}
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 1a06c2393719..4fbb56bcb1ee 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -195,7 +195,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
195 } 195 }
196 } else { 196 } else {
197 err = -EINVAL; 197 err = -EINVAL;
198 printk(KERN_ERR "%s: invalid device class\n", __FUNCTION__); 198 printk(KERN_ERR "%s: invalid device class\n", __func__);
199 WARN_ON(1); 199 WARN_ON(1);
200 } 200 }
201 mutex_unlock(&sysdev_drivers_lock); 201 mutex_unlock(&sysdev_drivers_lock);