summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEva Rachel Retuya <eraretuya@gmail.com>2016-03-05 23:16:17 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-10 19:26:05 -0800
commit7b50908a5eee25125023e22c5fed93f659bddd00 (patch)
treebc86923ce788880d2a6b8dce85f4e2ff85f5f6dc
parent9d521ca71d95a5aede00559db64622fdf5ee7dde (diff)
staging: unisys: visorinput: convert pr_err() to dev_err()
Replace pr_err() calls with respective dev_err() counterpart. Semantic patch used to detect and apply the transformation: @r exists@ identifier f,s,i; position p; @@ f(...,struct s *i,...) { <+... pr_err@p(...) ...+> } @s@ identifier r.s, dev; @@ struct s { ... struct device dev; ... }; @t@ identifier r.i, s.dev; expression fmt; position r.p; @@ - pr_err@p( + dev_err(&i->dev, fmt, ...); Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/unisys/visorinput/visorinput.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 38d4d5b884df..13c0316112ac 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -222,8 +222,9 @@ static int visorinput_open(struct input_dev *visorinput_dev)
struct visorinput_devdata *devdata = input_get_drvdata(visorinput_dev);
if (!devdata) {
- pr_err("%s input_get_drvdata(%p) returned NULL\n",
- __func__, visorinput_dev);
+ dev_err(&visorinput_dev->dev,
+ "%s input_get_drvdata(%p) returned NULL\n",
+ __func__, visorinput_dev);
return -EINVAL;
}
dev_dbg(&visorinput_dev->dev, "%s opened\n", __func__);
@@ -236,8 +237,9 @@ static void visorinput_close(struct input_dev *visorinput_dev)
struct visorinput_devdata *devdata = input_get_drvdata(visorinput_dev);
if (!devdata) {
- pr_err("%s input_get_drvdata(%p) returned NULL\n",
- __func__, visorinput_dev);
+ dev_err(&visorinput_dev->dev,
+ "%s input_get_drvdata(%p) returned NULL\n",
+ __func__, visorinput_dev);
return;
}
dev_dbg(&visorinput_dev->dev, "%s closed\n", __func__);