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>
This commit is contained in:
parent
9d521ca71d
commit
7b50908a5e
1 changed files with 6 additions and 4 deletions
|
@ -222,8 +222,9 @@ static int visorinput_open(struct input_dev *visorinput_dev)
|
||||||
struct visorinput_devdata *devdata = input_get_drvdata(visorinput_dev);
|
struct visorinput_devdata *devdata = input_get_drvdata(visorinput_dev);
|
||||||
|
|
||||||
if (!devdata) {
|
if (!devdata) {
|
||||||
pr_err("%s input_get_drvdata(%p) returned NULL\n",
|
dev_err(&visorinput_dev->dev,
|
||||||
__func__, visorinput_dev);
|
"%s input_get_drvdata(%p) returned NULL\n",
|
||||||
|
__func__, visorinput_dev);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
dev_dbg(&visorinput_dev->dev, "%s opened\n", __func__);
|
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);
|
struct visorinput_devdata *devdata = input_get_drvdata(visorinput_dev);
|
||||||
|
|
||||||
if (!devdata) {
|
if (!devdata) {
|
||||||
pr_err("%s input_get_drvdata(%p) returned NULL\n",
|
dev_err(&visorinput_dev->dev,
|
||||||
__func__, visorinput_dev);
|
"%s input_get_drvdata(%p) returned NULL\n",
|
||||||
|
__func__, visorinput_dev);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dev_dbg(&visorinput_dev->dev, "%s closed\n", __func__);
|
dev_dbg(&visorinput_dev->dev, "%s closed\n", __func__);
|
||||||
|
|
Loading…
Reference in a new issue