Commit 266a813c authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

firmware: use dev_printk when possible

Convert printks to use dev_printk().
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b46f69cd
...@@ -164,8 +164,7 @@ static ssize_t firmware_loading_store(struct device *dev, ...@@ -164,8 +164,7 @@ static ssize_t firmware_loading_store(struct device *dev,
} }
/* fallthrough */ /* fallthrough */
default: default:
printk(KERN_ERR "%s: unexpected value (%d)\n", __func__, dev_err(dev, "%s: unexpected value (%d)\n", __func__, loading);
loading);
/* fallthrough */ /* fallthrough */
case -1: case -1:
fw_load_abort(fw_priv); fw_load_abort(fw_priv);
...@@ -309,7 +308,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, ...@@ -309,7 +308,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
*dev_p = NULL; *dev_p = NULL;
if (!fw_priv || !f_dev) { if (!fw_priv || !f_dev) {
printk(KERN_ERR "%s: kmalloc failed\n", __func__); dev_err(device, "%s: kmalloc failed\n", __func__);
retval = -ENOMEM; retval = -ENOMEM;
goto error_kfree; goto error_kfree;
} }
...@@ -329,8 +328,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name, ...@@ -329,8 +328,7 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
f_dev->uevent_suppress = 1; f_dev->uevent_suppress = 1;
retval = device_register(f_dev); retval = device_register(f_dev);
if (retval) { if (retval) {
printk(KERN_ERR "%s: device_register failed\n", dev_err(device, "%s: device_register failed\n", __func__);
__func__);
goto error_kfree; goto error_kfree;
} }
*dev_p = f_dev; *dev_p = f_dev;
...@@ -363,15 +361,13 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p, ...@@ -363,15 +361,13 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p,
fw_priv->fw = fw; fw_priv->fw = fw;
retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data); retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data);
if (retval) { if (retval) {
printk(KERN_ERR "%s: sysfs_create_bin_file failed\n", dev_err(device, "%s: sysfs_create_bin_file failed\n", __func__);
__func__);
goto error_unreg; goto error_unreg;
} }
retval = device_create_file(f_dev, &dev_attr_loading); retval = device_create_file(f_dev, &dev_attr_loading);
if (retval) { if (retval) {
printk(KERN_ERR "%s: device_create_file failed\n", dev_err(device, "%s: device_create_file failed\n", __func__);
__func__);
goto error_unreg; goto error_unreg;
} }
...@@ -401,8 +397,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name, ...@@ -401,8 +397,8 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
*firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL); *firmware_p = firmware = kzalloc(sizeof(*firmware), GFP_KERNEL);
if (!firmware) { if (!firmware) {
printk(KERN_ERR "%s: kmalloc(struct firmware) failed\n", dev_err(device, "%s: kmalloc(struct firmware) failed\n",
__func__); __func__);
retval = -ENOMEM; retval = -ENOMEM;
goto out; goto out;
} }
...@@ -411,15 +407,15 @@ _request_firmware(const struct firmware **firmware_p, const char *name, ...@@ -411,15 +407,15 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
builtin++) { builtin++) {
if (strcmp(name, builtin->name)) if (strcmp(name, builtin->name))
continue; continue;
printk(KERN_INFO "firmware: using built-in firmware %s\n", dev_info(device, "firmware: using built-in firmware %s\n",
name); name);
firmware->size = builtin->size; firmware->size = builtin->size;
firmware->data = builtin->data; firmware->data = builtin->data;
return 0; return 0;
} }
if (uevent) if (uevent)
printk(KERN_INFO "firmware: requesting %s\n", name); dev_info(device, "firmware: requesting %s\n", name);
retval = fw_setup_device(firmware, &f_dev, name, device, uevent); retval = fw_setup_device(firmware, &f_dev, name, device, uevent);
if (retval) if (retval)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment