aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSangjung Woo <sangjung.woo@samsung.com>2013-11-12 18:11:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:31 -0500
commit1fbc4c4d79e63709b919bc1a72e991c29ea13f4c (patch)
tree7acc9733f34d063a3ca1be602265a2e384c7d894
parenta2726061920f43f594e03236d694c71f77adc6a2 (diff)
drivers/rtc/rtc-puv3.c: use dev_dbg() instead of pr_debug()
Because dev_*() are used along with pr_debug() function in this code, the debug message is not tidy. This patch converts from pr_debug() to dev_dbg() since dev_*() are encouraged to use in device driver code. Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-puv3.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c
index 402732cfb32a..1ecfe3bd92ac 100644
--- a/drivers/rtc/rtc-puv3.c
+++ b/drivers/rtc/rtc-puv3.c
@@ -53,11 +53,11 @@ static irqreturn_t puv3_rtc_tickirq(int irq, void *id)
53} 53}
54 54
55/* Update control registers */ 55/* Update control registers */
56static void puv3_rtc_setaie(int to) 56static void puv3_rtc_setaie(struct device *dev, int to)
57{ 57{
58 unsigned int tmp; 58 unsigned int tmp;
59 59
60 pr_debug("%s: aie=%d\n", __func__, to); 60 dev_dbg(dev, "%s: aie=%d\n", __func__, to);
61 61
62 tmp = readl(RTC_RTSR) & ~RTC_RTSR_ALE; 62 tmp = readl(RTC_RTSR) & ~RTC_RTSR_ALE;
63 63
@@ -71,7 +71,7 @@ static int puv3_rtc_setpie(struct device *dev, int enabled)
71{ 71{
72 unsigned int tmp; 72 unsigned int tmp;
73 73
74 pr_debug("%s: pie=%d\n", __func__, enabled); 74 dev_debug(dev, "%s: pie=%d\n", __func__, enabled);
75 75
76 spin_lock_irq(&puv3_rtc_pie_lock); 76 spin_lock_irq(&puv3_rtc_pie_lock);
77 tmp = readl(RTC_RTSR) & ~RTC_RTSR_HZE; 77 tmp = readl(RTC_RTSR) & ~RTC_RTSR_HZE;
@@ -90,7 +90,7 @@ static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm)
90{ 90{
91 rtc_time_to_tm(readl(RTC_RCNR), rtc_tm); 91 rtc_time_to_tm(readl(RTC_RCNR), rtc_tm);
92 92
93 pr_debug("read time %02x.%02x.%02x %02x/%02x/%02x\n", 93 dev_dbg(dev, "read time %02x.%02x.%02x %02x/%02x/%02x\n",
94 rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, 94 rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday,
95 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); 95 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec);
96 96
@@ -101,7 +101,7 @@ static int puv3_rtc_settime(struct device *dev, struct rtc_time *tm)
101{ 101{
102 unsigned long rtc_count = 0; 102 unsigned long rtc_count = 0;
103 103
104 pr_debug("set time %02d.%02d.%02d %02d/%02d/%02d\n", 104 dev_dbg(dev, "set time %02d.%02d.%02d %02d/%02d/%02d\n",
105 tm->tm_year, tm->tm_mon, tm->tm_mday, 105 tm->tm_year, tm->tm_mon, tm->tm_mday,
106 tm->tm_hour, tm->tm_min, tm->tm_sec); 106 tm->tm_hour, tm->tm_min, tm->tm_sec);
107 107
@@ -119,7 +119,7 @@ static int puv3_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm)
119 119
120 alrm->enabled = readl(RTC_RTSR) & RTC_RTSR_ALE; 120 alrm->enabled = readl(RTC_RTSR) & RTC_RTSR_ALE;
121 121
122 pr_debug("read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n", 122 dev_dbg(dev, "read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n",
123 alrm->enabled, 123 alrm->enabled,
124 alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, 124 alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday,
125 alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec); 125 alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec);
@@ -132,7 +132,7 @@ static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
132 struct rtc_time *tm = &alrm->time; 132 struct rtc_time *tm = &alrm->time;
133 unsigned long rtcalarm_count = 0; 133 unsigned long rtcalarm_count = 0;
134 134
135 pr_debug("puv3_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n", 135 dev_dbg(dev, "puv3_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n",
136 alrm->enabled, 136 alrm->enabled,
137 tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff, 137 tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff,
138 tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec); 138 tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec);
@@ -140,7 +140,7 @@ static int puv3_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
140 rtc_tm_to_time(tm, &rtcalarm_count); 140 rtc_tm_to_time(tm, &rtcalarm_count);
141 writel(rtcalarm_count, RTC_RTAR); 141 writel(rtcalarm_count, RTC_RTAR);
142 142
143 puv3_rtc_setaie(alrm->enabled); 143 puv3_rtc_setaie(&dev->dev, alrm->enabled);
144 144
145 if (alrm->enabled) 145 if (alrm->enabled)
146 enable_irq_wake(puv3_rtc_alarmno); 146 enable_irq_wake(puv3_rtc_alarmno);
@@ -227,7 +227,7 @@ static int puv3_rtc_remove(struct platform_device *dev)
227 rtc_device_unregister(rtc); 227 rtc_device_unregister(rtc);
228 228
229 puv3_rtc_setpie(&dev->dev, 0); 229 puv3_rtc_setpie(&dev->dev, 0);
230 puv3_rtc_setaie(0); 230 puv3_rtc_setaie(&dev->dev, 0);
231 231
232 release_resource(puv3_rtc_mem); 232 release_resource(puv3_rtc_mem);
233 kfree(puv3_rtc_mem); 233 kfree(puv3_rtc_mem);
@@ -241,7 +241,7 @@ static int puv3_rtc_probe(struct platform_device *pdev)
241 struct resource *res; 241 struct resource *res;
242 int ret; 242 int ret;
243 243
244 pr_debug("%s: probe=%p\n", __func__, pdev); 244 dev_dbg(&pdev->dev, "%s: probe=%p\n", __func__, pdev);
245 245
246 /* find the IRQs */ 246 /* find the IRQs */
247 puv3_rtc_tickno = platform_get_irq(pdev, 1); 247 puv3_rtc_tickno = platform_get_irq(pdev, 1);
@@ -256,7 +256,7 @@ static int puv3_rtc_probe(struct platform_device *pdev)
256 return -ENOENT; 256 return -ENOENT;
257 } 257 }
258 258
259 pr_debug("PKUnity_rtc: tick irq %d, alarm irq %d\n", 259 dev_dbg(&pdev->dev, "PKUnity_rtc: tick irq %d, alarm irq %d\n",
260 puv3_rtc_tickno, puv3_rtc_alarmno); 260 puv3_rtc_tickno, puv3_rtc_alarmno);
261 261
262 /* get the memory region */ 262 /* get the memory region */