Skip to content

Commit

Permalink
SPEAr3xx: Replace printk() with pr_*()
Browse files Browse the repository at this point in the history
For better print logs/messages, it is advisable to use pr_*() routines instead
of directly calling printks. This patch removes direct calling of printks for
spear3xx.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
  • Loading branch information
Viresh Kumar authored and Arnd Bergmann committed Apr 22, 2012
1 parent a3a4513 commit 5fb00f9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
8 changes: 5 additions & 3 deletions arch/arm/mach-spear3xx/spear300.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* warranty of any kind, whether express or implied.
*/

#define pr_fmt(fmt) "SPEAr300: " fmt

#include <linux/types.h>
#include <linux/amba/pl061.h>
#include <linux/ptrace.h>
Expand Down Expand Up @@ -447,7 +449,7 @@ void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
if (shirq_ras1.regs.base) {
ret = spear_shirq_register(&shirq_ras1);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ\n");
pr_err("Error registering Shared IRQ\n");
}

/* pmx initialization */
Expand All @@ -459,8 +461,8 @@ void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
if (pmx_driver.base) {
ret = pmx_register(&pmx_driver);
if (ret)
printk(KERN_ERR "padmux: registration failed. err no"
": %d\n", ret);
pr_err("padmux: registration failed. err no: %d\n",
ret);
/* Free Mapping, device selection already done */
iounmap(pmx_driver.base);
}
Expand Down
13 changes: 7 additions & 6 deletions arch/arm/mach-spear3xx/spear310.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* warranty of any kind, whether express or implied.
*/

#define pr_fmt(fmt) "SPEAr310: " fmt

#include <linux/ptrace.h>
#include <asm/irq.h>
#include <plat/shirq.h>
Expand Down Expand Up @@ -274,25 +276,25 @@ void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
shirq_ras1.regs.base = base;
ret = spear_shirq_register(&shirq_ras1);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 1\n");
pr_err("Error registering Shared IRQ 1\n");

/* shirq 2 */
shirq_ras2.regs.base = base;
ret = spear_shirq_register(&shirq_ras2);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 2\n");
pr_err("Error registering Shared IRQ 2\n");

/* shirq 3 */
shirq_ras3.regs.base = base;
ret = spear_shirq_register(&shirq_ras3);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 3\n");
pr_err("Error registering Shared IRQ 3\n");

/* shirq 4 */
shirq_intrcomm_ras.regs.base = base;
ret = spear_shirq_register(&shirq_intrcomm_ras);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 4\n");
pr_err("Error registering Shared IRQ 4\n");
}

/* pmx initialization */
Expand All @@ -303,6 +305,5 @@ void __init spear310_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,

ret = pmx_register(&pmx_driver);
if (ret)
printk(KERN_ERR "padmux: registration failed. err no: %d\n",
ret);
pr_err("padmux: registration failed. err no: %d\n", ret);
}
11 changes: 6 additions & 5 deletions arch/arm/mach-spear3xx/spear320.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* warranty of any kind, whether express or implied.
*/

#define pr_fmt(fmt) "SPEAr320: " fmt

#include <linux/ptrace.h>
#include <asm/irq.h>
#include <plat/shirq.h>
Expand Down Expand Up @@ -527,19 +529,19 @@ void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
shirq_ras1.regs.base = base;
ret = spear_shirq_register(&shirq_ras1);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 1\n");
pr_err("Error registering Shared IRQ 1\n");

/* shirq 3 */
shirq_ras3.regs.base = base;
ret = spear_shirq_register(&shirq_ras3);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 3\n");
pr_err("Error registering Shared IRQ 3\n");

/* shirq 4 */
shirq_intrcomm_ras.regs.base = base;
ret = spear_shirq_register(&shirq_intrcomm_ras);
if (ret)
printk(KERN_ERR "Error registering Shared IRQ 4\n");
pr_err("Error registering Shared IRQ 4\n");
}

/* pmx initialization */
Expand All @@ -550,6 +552,5 @@ void __init spear320_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,

ret = pmx_register(&pmx_driver);
if (ret)
printk(KERN_ERR "padmux: registration failed. err no: %d\n",
ret);
pr_err("padmux: registration failed. err no: %d\n", ret);
}
2 changes: 2 additions & 0 deletions arch/arm/mach-spear3xx/spear3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* warranty of any kind, whether express or implied.
*/

#define pr_fmt(fmt) "SPEAr3xx: " fmt

#include <linux/types.h>
#include <linux/amba/pl061.h>
#include <linux/ptrace.h>
Expand Down

0 comments on commit 5fb00f9

Please sign in to comment.