Skip to content

Commit aaa5241

Browse files
committed
microblaze: Prefer to use pr_XXX instead of printk(KERN_XX)
Fix reset.c, timer.c, setup.c file. Signed-off-by: Michal Simek <monstr@monstr.eu>
1 parent fcc1c0f commit aaa5241

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎arch/microblaze/kernel/reset.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ void of_platform_reset_gpio_probe(void)
2626
"hard-reset-gpios", 0);
2727

2828
if (!gpio_is_valid(handle)) {
29-
printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n",
29+
pr_info("Skipping unavailable RESET gpio %d (%s)\n",
3030
handle, "reset");
3131
return;
3232
}
3333

3434
ret = gpio_request(handle, "reset");
3535
if (ret < 0) {
36-
printk(KERN_INFO "GPIO pin is already allocated\n");
36+
pr_info("GPIO pin is already allocated\n");
3737
return;
3838
}
3939

@@ -50,7 +50,7 @@ void of_platform_reset_gpio_probe(void)
5050
/* Setup output direction */
5151
gpio_set_value(handle, 0);
5252

53-
printk(KERN_INFO "RESET: Registered gpio device: %d, current val: %d\n",
53+
pr_info("RESET: Registered gpio device: %d, current val: %d\n",
5454
handle, reset_val);
5555
return;
5656
err:
@@ -76,29 +76,29 @@ void of_platform_reset_gpio_probe(void)
7676

7777
void machine_restart(char *cmd)
7878
{
79-
printk(KERN_NOTICE "Machine restart...\n");
79+
pr_notice("Machine restart...\n");
8080
gpio_system_reset();
8181
while (1)
8282
;
8383
}
8484

8585
void machine_shutdown(void)
8686
{
87-
printk(KERN_NOTICE "Machine shutdown...\n");
87+
pr_notice("Machine shutdown...\n");
8888
while (1)
8989
;
9090
}
9191

9292
void machine_halt(void)
9393
{
94-
printk(KERN_NOTICE "Machine halt...\n");
94+
pr_notice("Machine halt...\n");
9595
while (1)
9696
;
9797
}
9898

9999
void machine_power_off(void)
100100
{
101-
printk(KERN_NOTICE "Machine power off...\n");
101+
pr_notice("Machine power off...\n");
102102
while (1)
103103
;
104104
}

‎arch/microblaze/kernel/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void __init setup_arch(char **cmdline_p)
6969
xilinx_pci_init();
7070

7171
#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER)
72-
printk(KERN_NOTICE "Self modified code enable\n");
72+
pr_notice("Self modified code enable\n");
7373
#endif
7474

7575
#ifdef CONFIG_VT

‎arch/microblaze/kernel/timer.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,21 @@ static void microblaze_timer_set_mode(enum clock_event_mode mode,
116116
{
117117
switch (mode) {
118118
case CLOCK_EVT_MODE_PERIODIC:
119-
printk(KERN_INFO "%s: periodic\n", __func__);
119+
pr_info("%s: periodic\n", __func__);
120120
microblaze_timer0_start_periodic(freq_div_hz);
121121
break;
122122
case CLOCK_EVT_MODE_ONESHOT:
123-
printk(KERN_INFO "%s: oneshot\n", __func__);
123+
pr_info("%s: oneshot\n", __func__);
124124
break;
125125
case CLOCK_EVT_MODE_UNUSED:
126-
printk(KERN_INFO "%s: unused\n", __func__);
126+
pr_info("%s: unused\n", __func__);
127127
break;
128128
case CLOCK_EVT_MODE_SHUTDOWN:
129-
printk(KERN_INFO "%s: shutdown\n", __func__);
129+
pr_info("%s: shutdown\n", __func__);
130130
microblaze_timer0_stop();
131131
break;
132132
case CLOCK_EVT_MODE_RESUME:
133-
printk(KERN_INFO "%s: resume\n", __func__);
133+
pr_info("%s: resume\n", __func__);
134134
break;
135135
}
136136
}
@@ -274,14 +274,14 @@ void __init time_init(void)
274274
timer_num = be32_to_cpup(of_get_property(timer,
275275
"xlnx,one-timer-only", NULL));
276276
if (timer_num) {
277-
printk(KERN_EMERG "Please enable two timers in HW\n");
277+
pr_emerg("Please enable two timers in HW\n");
278278
BUG();
279279
}
280280

281281
#ifdef CONFIG_SELFMOD_TIMER
282282
selfmod_function((int *) arr_func, timer_baseaddr);
283283
#endif
284-
printk(KERN_INFO "%s #0 at 0x%08x, irq=%d\n",
284+
pr_info("%s #0 at 0x%08x, irq=%d\n",
285285
timer->name, timer_baseaddr, irq);
286286

287287
/* If there is clock-frequency property than use it */

0 commit comments

Comments
 (0)