Skip to content

Commit

Permalink
powerpc/CPM: Minor cosmetic changes to udbg_putc
Browse files Browse the repository at this point in the history
udbg_putc is a *function pointer* that is initialized during
udbg_init_cpm. It might not be initialized properly when called from
udbg_putc_cpm(), so (recursively) call udbg_putc_cpm() directly.

Signed-off-by: Nye Liu <nyet@mrv.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Nye Liu authored and Kumar Gala committed Jul 14, 2008
1 parent a308322 commit 5e82eb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/sysdev/cpm_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void udbg_putc_cpm(char c)
u8 __iomem *txbuf = (u8 __iomem __force *)in_be32(&cpm_udbg_txdesc[1]);

if (c == '\n')
udbg_putc('\r');
udbg_putc_cpm('\r');

while (in_be32(&cpm_udbg_txdesc[0]) & 0x80000000)
;
Expand All @@ -53,7 +53,6 @@ void __init udbg_init_cpm(void)
setbat(1, 0xf0000000, 0xf0000000, 1024*1024, _PAGE_IO);
#endif
udbg_putc = udbg_putc_cpm;
udbg_putc('X');
}
}
#endif
Expand Down

0 comments on commit 5e82eb3

Please sign in to comment.