Skip to content

Commit

Permalink
microblaze: Prefer to use pr_XXX instead of printk(KERN_XX)
Browse files Browse the repository at this point in the history
Fix reset.c, timer.c, setup.c file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Oct 4, 2012
1 parent fcc1c0f commit aaa5241
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions arch/microblaze/kernel/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ void of_platform_reset_gpio_probe(void)
"hard-reset-gpios", 0);

if (!gpio_is_valid(handle)) {
printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n",
pr_info("Skipping unavailable RESET gpio %d (%s)\n",
handle, "reset");
return;
}

ret = gpio_request(handle, "reset");
if (ret < 0) {
printk(KERN_INFO "GPIO pin is already allocated\n");
pr_info("GPIO pin is already allocated\n");
return;
}

Expand All @@ -50,7 +50,7 @@ void of_platform_reset_gpio_probe(void)
/* Setup output direction */
gpio_set_value(handle, 0);

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

void machine_restart(char *cmd)
{
printk(KERN_NOTICE "Machine restart...\n");
pr_notice("Machine restart...\n");
gpio_system_reset();
while (1)
;
}

void machine_shutdown(void)
{
printk(KERN_NOTICE "Machine shutdown...\n");
pr_notice("Machine shutdown...\n");
while (1)
;
}

void machine_halt(void)
{
printk(KERN_NOTICE "Machine halt...\n");
pr_notice("Machine halt...\n");
while (1)
;
}

void machine_power_off(void)
{
printk(KERN_NOTICE "Machine power off...\n");
pr_notice("Machine power off...\n");
while (1)
;
}
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void __init setup_arch(char **cmdline_p)
xilinx_pci_init();

#if defined(CONFIG_SELFMOD_INTC) || defined(CONFIG_SELFMOD_TIMER)
printk(KERN_NOTICE "Self modified code enable\n");
pr_notice("Self modified code enable\n");
#endif

#ifdef CONFIG_VT
Expand Down
14 changes: 7 additions & 7 deletions arch/microblaze/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,21 @@ static void microblaze_timer_set_mode(enum clock_event_mode mode,
{
switch (mode) {
case CLOCK_EVT_MODE_PERIODIC:
printk(KERN_INFO "%s: periodic\n", __func__);
pr_info("%s: periodic\n", __func__);
microblaze_timer0_start_periodic(freq_div_hz);
break;
case CLOCK_EVT_MODE_ONESHOT:
printk(KERN_INFO "%s: oneshot\n", __func__);
pr_info("%s: oneshot\n", __func__);
break;
case CLOCK_EVT_MODE_UNUSED:
printk(KERN_INFO "%s: unused\n", __func__);
pr_info("%s: unused\n", __func__);
break;
case CLOCK_EVT_MODE_SHUTDOWN:
printk(KERN_INFO "%s: shutdown\n", __func__);
pr_info("%s: shutdown\n", __func__);
microblaze_timer0_stop();
break;
case CLOCK_EVT_MODE_RESUME:
printk(KERN_INFO "%s: resume\n", __func__);
pr_info("%s: resume\n", __func__);
break;
}
}
Expand Down Expand Up @@ -274,14 +274,14 @@ void __init time_init(void)
timer_num = be32_to_cpup(of_get_property(timer,
"xlnx,one-timer-only", NULL));
if (timer_num) {
printk(KERN_EMERG "Please enable two timers in HW\n");
pr_emerg("Please enable two timers in HW\n");
BUG();
}

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

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

0 comments on commit aaa5241

Please sign in to comment.