diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2015-03-17 08:34:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 11:16:36 +0100 |
commit | df02b50acfcec04cd50abc5f6265118d2cdacbee (patch) | |
tree | 700f0720f97520849854e7aad7f1aa36535b452a /drivers/staging/gdm724x/gdm_mux.c | |
parent | a112eab4d5e78433a7c65b5703ad177cdabc6588 (diff) | |
download | linux-df02b50acfcec04cd50abc5f6265118d2cdacbee.tar.bz2 |
Staging: gdm724x: replace pr_err with dev_err
This patch replace pr_err with dev_err, when appropriate device structre
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: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm724x/gdm_mux.c')
-rw-r--r-- | drivers/staging/gdm724x/gdm_mux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index d1ab996b3305..b987ba0510b7 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -608,7 +608,7 @@ static int gdm_mux_suspend(struct usb_interface *intf, pm_message_t pm_msg) rx = &mux_dev->rx; if (mux_dev->usb_state != PM_NORMAL) { - pr_err("usb suspend - invalid state\n"); + dev_err(intf->usb_dev, "usb suspend - invalid state\n"); return -1; } @@ -637,7 +637,7 @@ static int gdm_mux_resume(struct usb_interface *intf) mux_dev = tty_dev->priv_dev; if (mux_dev->usb_state != PM_SUSPEND) { - pr_err("usb resume - invalid state\n"); + dev_err(intf->usb_dev, "usb resume - invalid state\n"); return -1; } |