Commit 41f06c61 authored by Haneen Mohammed's avatar Haneen Mohammed Committed by Greg Kroah-Hartman

Staging: ft1000: replace pr_err with dev_err

This patch replace pr_err with dev_err, when appropriate device
structure is found.

Issue found using the following Coccinelle script:

@r exists@
identifier f, s, i;
position p;
@@

f(...,struct s *i,...) {
<+...
when != i == NULL
pr_err@p(...);
...+>
}

@rr@
identifier r.s, fld;
@@

struct s {
	...
	struct device *fld;
	...
};

@@
identifier r.i, rr.fld;
position r.p;
@@
-pr_err@p
+dev_err
   (
+ i->fld,
...)
Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92371df8
...@@ -136,7 +136,7 @@ static int ft1000_probe(struct usb_interface *interface, ...@@ -136,7 +136,7 @@ static int ft1000_probe(struct usb_interface *interface,
ret = request_firmware(&dsp_fw, "ft3000.img", &dev->dev); ret = request_firmware(&dsp_fw, "ft3000.img", &dev->dev);
if (ret < 0) { if (ret < 0) {
pr_err("Error request_firmware()\n"); dev_err(interface->usb_dev, "Error request_firmware()\n");
goto err_fw; goto err_fw;
} }
...@@ -164,7 +164,8 @@ static int ft1000_probe(struct usb_interface *interface, ...@@ -164,7 +164,8 @@ static int ft1000_probe(struct usb_interface *interface,
pr_debug("pft1000info=%p\n", pft1000info); pr_debug("pft1000info=%p\n", pft1000info);
ret = dsp_reload(ft1000dev); ret = dsp_reload(ft1000dev);
if (ret) { if (ret) {
pr_err("Problem with DSP image loading\n"); dev_err(interface->usb_dev,
"Problem with DSP image loading\n");
goto err_load; goto err_load;
} }
......
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