diff options
author | Alexander Gordeev <lasaine@lvk.cs.msu.su> | 2011-01-12 20:00:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:19 -0500 |
commit | 7f7cce74105adf714bdc9357da3b6f06e019958c (patch) | |
tree | 1fcb692726c5bf91280bcac5a65584eddcd93bf6 /drivers/pps/clients | |
parent | 5e196d34a776420278e4117b4742cd9d3f2350ed (diff) |
pps: convert printk/pr_* to dev_*
Since we now have direct pointers to struct pps_device everywhere it's
easy to use dev_* functions to print messages instead of plain printks.
Where dev_* cannot be used printks are converted to pr_*.
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pps/clients')
-rw-r--r-- | drivers/pps/clients/pps-ktimer.c | 5 | ||||
-rw-r--r-- | drivers/pps/clients/pps-ldisc.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pps/clients/pps-ktimer.c b/drivers/pps/clients/pps-ktimer.c index 966ead188ee2..2728469d3884 100644 --- a/drivers/pps/clients/pps-ktimer.c +++ b/drivers/pps/clients/pps-ktimer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | 23 | ||
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -45,7 +46,7 @@ static void pps_ktimer_event(unsigned long ptr) | |||
45 | /* First of all we get the time stamp... */ | 46 | /* First of all we get the time stamp... */ |
46 | pps_get_ts(&ts); | 47 | pps_get_ts(&ts); |
47 | 48 | ||
48 | pr_info("PPS event at %lu\n", jiffies); | 49 | dev_info(pps->dev, "PPS event at %lu\n", jiffies); |
49 | 50 | ||
50 | pps_event(pps, &ts, PPS_CAPTUREASSERT, NULL); | 51 | pps_event(pps, &ts, PPS_CAPTUREASSERT, NULL); |
51 | 52 | ||
@@ -94,7 +95,7 @@ static int __init pps_ktimer_init(void) | |||
94 | pps = pps_register_source(&pps_ktimer_info, | 95 | pps = pps_register_source(&pps_ktimer_info, |
95 | PPS_CAPTUREASSERT | PPS_OFFSETASSERT); | 96 | PPS_CAPTUREASSERT | PPS_OFFSETASSERT); |
96 | if (pps == NULL) { | 97 | if (pps == NULL) { |
97 | printk(KERN_ERR "cannot register ktimer source\n"); | 98 | pr_err("cannot register PPS source\n"); |
98 | return -ENOMEM; | 99 | return -ENOMEM; |
99 | } | 100 | } |
100 | 101 | ||
diff --git a/drivers/pps/clients/pps-ldisc.c b/drivers/pps/clients/pps-ldisc.c index 1517f5498ec0..1b3c6eda12ba 100644 --- a/drivers/pps/clients/pps-ldisc.c +++ b/drivers/pps/clients/pps-ldisc.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #include <linux/module.h> | 24 | #include <linux/module.h> |
23 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
24 | #include <linux/tty.h> | 26 | #include <linux/tty.h> |