diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2015-03-18 13:09:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 11:21:33 +0100 |
commit | 2c9356d115c91c18a2508a266a482c47fc3659c6 (patch) | |
tree | b9d3faeef929dd19ba3b196a8c12b58ffc699b37 /drivers/staging/media/lirc/lirc_sasem.c | |
parent | 3d719423da9fdaa4c126a91cac91c3a0679226df (diff) |
Staging: media: replace pr_* with dev_*
This patch replace pr_err/pr_info with dev_err/dev_infi, when
appropriate device structure is found.
Issues found using the following Coccinelle script. pr_err/dev_err was
substituted with pr_info/dev_info in the later case.
@r exists@
identifier f, s, i;
position p;
@@
f(...,struct s *i,...) {
<+...
when != i == NULL
pr_err@p(...);
...+>
}
@rr@
identifier r.s, s2, fld;
@@
struct s {
...
struct s2 *fld;
...
};
@rrr@
identifier rr.s2, fld2;
@@
struct s2 {
...
struct device fld2;
...
};
@@
identifier r.i, r.s, rr.fld, rrr.fld2;
position r.p;
@@
-pr_err@p
+dev_err
(
+ &i->fld->fld2,
...)
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/lirc/lirc_sasem.c')
-rw-r--r-- | drivers/staging/media/lirc/lirc_sasem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c index b9c53e2d5d29..0c9e08247d7f 100644 --- a/drivers/staging/media/lirc/lirc_sasem.c +++ b/drivers/staging/media/lirc/lirc_sasem.c @@ -172,7 +172,8 @@ static void delete_context(struct sasem_context *context) kfree(context); if (debug) - pr_info("%s: context deleted\n", __func__); + dev_info(&context->dev->dev, "%s: context deleted\n", + __func__); } static void deregister_from_lirc(struct sasem_context *context) @@ -182,10 +183,12 @@ static void deregister_from_lirc(struct sasem_context *context) retval = lirc_unregister_driver(minor); if (retval) - pr_err("%s: unable to deregister from lirc (%d)\n", + dev_err(&context->dev->dev, + "%s: unable to deregister from lirc (%d)\n", __func__, retval); else - pr_info("Deregistered Sasem driver (minor:%d)\n", minor); + dev_info(&context->dev->dev, + "Deregistered Sasem driver (minor:%d)\n", minor); } |