diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-10-16 01:04:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:47 -0400 |
commit | 266a813c083d67886d89f1066ea6355857b51f83 (patch) | |
tree | eee25cf2db8a0e0e046b6c9d6b074498a337c243 /drivers/base/firmware_class.c | |
parent | b46f69cd24b9020433f8f153e7d9194b5bfdf5e2 (diff) |
firmware: use dev_printk when possible
Convert printks to use dev_printk().
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base/firmware_class.c')
-rw-r--r-- | drivers/base/firmware_class.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index c9c92b00fd55..b7e571031ecd 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -164,8 +164,7 @@ static ssize_t firmware_loading_store(struct device *dev, | |||
164 | } | 164 | } |
165 | /* fallthrough */ | 165 | /* fallthrough */ |
166 | default: | 166 | default: |
167 | printk(KERN_ERR "%s: unexpected value (%d)\n", __func__, | 167 | dev_err(dev, "%s: unexpected value (%d)\n", __func__, loading); |
168 | loading); | ||
169 | /* fallthrough */ | 168 | /* fallthrough */ |
170 | case -1: | 169 | case -1: |
171 | fw_load_abort(fw_priv); | 170 | fw_load_abort(fw_priv); |
@@ -309,7 +308,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, | |||
309 | *dev_p = NULL; | 308 | *dev_p = NULL; |
310 | 309 | ||
311 | if (!fw_priv || !f_dev) { | 310 | if (!fw_priv || !f_dev) { |
312 | printk(KERN_ERR "%s: kmalloc failed\n", __func__); | 311 | dev_err(device, "%s: kmalloc failed\n", __func__); |
313 | retval = -ENOMEM; | 312 | retval = -ENOMEM; |
314 | goto error_kfree; | 313 | goto error_kfree; |
315 | } | 314 | } |
@@ -329,8 +328,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, | |||
329 | f_dev->uevent_suppress = 1; | 328 | f_dev->uevent_suppress = 1; |
330 | retval = device_register(f_dev); | 329 | retval = device_register(f_dev); |
331 | if (retval) { | 330 | if (retval) { |
332 | printk(KERN_ERR "%s: device_register failed\n", | 331 | dev_err(device, "%s: device_register failed\n", __func__); |
333 | __func__); | ||
334 | goto error_kfree; | 332 | goto error_kfree; |
335 | } | 333 | } |
336 | *dev_p = f_dev; | 334 | *dev_p = f_dev; |
@@ -363,15 +361,13 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p, | |||
363 | fw_priv->fw = fw; | 361 | fw_priv->fw = fw; |
364 | 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); |
365 | if (retval) { | 363 | if (retval) { |
366 | printk(KERN_ERR "%s: sysfs_create_bin_file failed\n", | 364 | dev_err(device, "%s: sysfs_create_bin_file failed\n", __func__); |
367 | __func__); | ||
368 | goto error_unreg; | 365 | goto error_unreg; |
369 | } | 366 | } |
370 | 367 | ||
371 | retval = device_create_file(f_dev, &dev_attr_loading); | 368 | retval = device_create_file(f_dev, &dev_attr_loading); |
372 | if (retval) { | 369 | if (retval) { |
373 | printk(KERN_ERR "%s: device_create_file failed\n", | 370 | dev_err(device, "%s: device_create_file failed\n", __func__); |
374 | __func__); | ||
375 | goto error_unreg; | 371 | goto error_unreg; |
376 | } | 372 | } |
377 | 373 | ||
@@ -401,8 +397,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name, | |||
401 | 397 | ||
402 | *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL); | 398 | *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL); |
403 | if (!firmware) { | 399 | if (!firmware) { |
404 | printk(KERN_ERR "%s: kmalloc(struct firmware) failed\n", | 400 | dev_err(device, "%s: kmalloc(struct firmware) failed\n", |
405 | __func__); | 401 | __func__); |
406 | retval = -ENOMEM; | 402 | retval = -ENOMEM; |
407 | goto out; | 403 | goto out; |
408 | } | 404 | } |
@@ -411,15 +407,15 @@ _request_firmware(const struct firmware **firmware_p, const char *name, | |||
411 | builtin++) { | 407 | builtin++) { |
412 | if (strcmp(name, builtin->name)) | 408 | if (strcmp(name, builtin->name)) |
413 | continue; | 409 | continue; |
414 | printk(KERN_INFO "firmware: using built-in firmware %s\n", | 410 | dev_info(device, "firmware: using built-in firmware %s\n", |
415 | name); | 411 | name); |
416 | firmware->size = builtin->size; | 412 | firmware->size = builtin->size; |
417 | firmware->data = builtin->data; | 413 | firmware->data = builtin->data; |
418 | return 0; | 414 | return 0; |
419 | } | 415 | } |
420 | 416 | ||
421 | if (uevent) | 417 | if (uevent) |
422 | printk(KERN_INFO "firmware: requesting %s\n", name); | 418 | dev_info(device, "firmware: requesting %s\n", name); |
423 | 419 | ||
424 | retval = fw_setup_device(firmware, &f_dev, name, device, uevent); | 420 | retval = fw_setup_device(firmware, &f_dev, name, device, uevent); |
425 | if (retval) | 421 | if (retval) |