Commit 397964ab authored by Tom Rini's avatar Tom Rini

PPC32: Change all #if FOO to #ifdef FOO

parent 200884c5
...@@ -763,7 +763,7 @@ static void siccuart_change_speed(struct SICC_info *info, struct termios *old_te ...@@ -763,7 +763,7 @@ static void siccuart_change_speed(struct SICC_info *info, struct termios *old_te
cflag = info->tty->termios->c_cflag; cflag = info->tty->termios->c_cflag;
#if DEBUG #ifdef DEBUG
printk("siccuart_set_cflag(0x%x) called\n", cflag); printk("siccuart_set_cflag(0x%x) called\n", cflag);
#endif #endif
/* byte size and parity */ /* byte size and parity */
...@@ -1027,7 +1027,7 @@ static void siccuart_flush_buffer(struct tty_struct *tty) ...@@ -1027,7 +1027,7 @@ static void siccuart_flush_buffer(struct tty_struct *tty)
struct SICC_info *info = tty->driver_data; struct SICC_info *info = tty->driver_data;
unsigned long flags; unsigned long flags;
#if DEBUG #ifdef DEBUG
printk("siccuart_flush_buffer(%d) called\n", tty->index); printk("siccuart_flush_buffer(%d) called\n", tty->index);
#endif #endif
save_flags(flags); cli(); save_flags(flags); cli();
...@@ -1433,7 +1433,7 @@ static void siccuart_close(struct tty_struct *tty, struct file *filp) ...@@ -1433,7 +1433,7 @@ static void siccuart_close(struct tty_struct *tty, struct file *filp)
state = info->state; state = info->state;
#if DEBUG #ifdef DEBUG
//printk("siccuart_close() called\n"); //printk("siccuart_close() called\n");
#endif #endif
...@@ -1544,7 +1544,7 @@ static void siccuart_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -1544,7 +1544,7 @@ static void siccuart_wait_until_sent(struct tty_struct *tty, int timeout)
timeout = 2 * info->timeout; timeout = 2 * info->timeout;
expire = jiffies + timeout; expire = jiffies + timeout;
#if DEBUG #ifdef DEBUG
printk("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu char_time=%lu...\n", printk("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu char_time=%lu...\n",
tty->index, jiffies, tty->index, jiffies,
expire, char_time); expire, char_time);
...@@ -1831,7 +1831,7 @@ static int siccuart_console_read(struct console *co, const char *s, u_int count) ...@@ -1831,7 +1831,7 @@ static int siccuart_console_read(struct console *co, const char *s, u_int count)
unsigned int status; unsigned int status;
char *w; char *w;
int c; int c;
#if DEBUG #ifdef DEBUG
printk("siccuart_console_read() called\n"); printk("siccuart_console_read() called\n");
#endif #endif
......
...@@ -155,7 +155,7 @@ static unsigned long break_pressed; /* break, really ... */ ...@@ -155,7 +155,7 @@ static unsigned long break_pressed; /* break, really ... */
static struct serial_state rs_table[] = { static struct serial_state rs_table[] = {
/* UART CLK PORT IRQ FLAGS NUM */ /* UART CLK PORT IRQ FLAGS NUM */
{ 0, 0, PROFF_SMC1, SIU_INT_SMC1, 0, 0 }, /* SMC1 ttyS0 */ { 0, 0, PROFF_SMC1, SIU_INT_SMC1, 0, 0 }, /* SMC1 ttyS0 */
#if USE_SMC2 #ifdef USE_SMC2
{ 0, 0, PROFF_SMC2, SIU_INT_SMC2, 0, 1 }, /* SMC2 ttyS1 */ { 0, 0, PROFF_SMC2, SIU_INT_SMC2, 0, 1 }, /* SMC2 ttyS1 */
#endif #endif
#ifndef CONFIG_SCC1_ENET #ifndef CONFIG_SCC1_ENET
...@@ -2565,7 +2565,7 @@ static int __init rs_8xx_init(void) ...@@ -2565,7 +2565,7 @@ static int __init rs_8xx_init(void)
io->iop_pdird |= 0x00400000; io->iop_pdird |= 0x00400000;
io->iop_pdird &= ~0x00800000; io->iop_pdird &= ~0x00800000;
io->iop_psord &= ~0x00c00000; io->iop_psord &= ~0x00c00000;
#if USE_SMC2 #ifdef USE_SMC2
io->iop_ppara |= 0x00c00000; io->iop_ppara |= 0x00c00000;
io->iop_pdira |= 0x00400000; io->iop_pdira |= 0x00400000;
io->iop_pdira &= ~0x00800000; io->iop_pdira &= ~0x00800000;
......
...@@ -361,7 +361,7 @@ handle_rt_signal(unsigned long sig, struct k_sigaction *ka, ...@@ -361,7 +361,7 @@ handle_rt_signal(unsigned long sig, struct k_sigaction *ka,
return; return;
badframe: badframe:
#if DEBUG_SIG #ifdef DEBUG_SIG
printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n", printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n",
regs, frame, newsp); regs, frame, newsp);
#endif #endif
...@@ -513,7 +513,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, ...@@ -513,7 +513,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
return; return;
badframe: badframe:
#if DEBUG_SIG #ifdef DEBUG_SIG
printk("badframe in handle_signal, regs=%p frame=%lx newsp=%lx\n", printk("badframe in handle_signal, regs=%p frame=%lx newsp=%lx\n",
regs, frame, *newspp); regs, frame, *newspp);
#endif #endif
......
...@@ -401,12 +401,12 @@ gemini_set_rtc_time( unsigned long now ) ...@@ -401,12 +401,12 @@ gemini_set_rtc_time( unsigned long now )
to_tm( now, &tm ); to_tm( now, &tm );
reg = gemini_rtc_read(M48T35_RTC_CONTROL); reg = gemini_rtc_read(M48T35_RTC_CONTROL);
#if DEBUG_RTC #ifdef DEBUG_RTC
printk("set rtc: reg = %x\n", reg); printk("set rtc: reg = %x\n", reg);
#endif #endif
gemini_rtc_write((reg|M48T35_RTC_SET), M48T35_RTC_CONTROL); gemini_rtc_write((reg|M48T35_RTC_SET), M48T35_RTC_CONTROL);
#if DEBUG_RTC #ifdef DEBUG_RTC
printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n", printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n",
tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year); tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year);
#endif #endif
......
...@@ -87,7 +87,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) ...@@ -87,7 +87,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
idx = type + KM_TYPE_NR*smp_processor_id(); idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = KMAP_FIX_BEGIN + idx * PAGE_SIZE; vaddr = KMAP_FIX_BEGIN + idx * PAGE_SIZE;
#if HIGHMEM_DEBUG #ifdef HIGHMEM_DEBUG
BUG_ON(!pte_none(*(kmap_pte+idx))); BUG_ON(!pte_none(*(kmap_pte+idx)));
#endif #endif
set_pte(kmap_pte+idx, mk_pte(page, kmap_prot)); set_pte(kmap_pte+idx, mk_pte(page, kmap_prot));
...@@ -98,7 +98,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) ...@@ -98,7 +98,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
static inline void kunmap_atomic(void *kvaddr, enum km_type type) static inline void kunmap_atomic(void *kvaddr, enum km_type type)
{ {
#if HIGHMEM_DEBUG #ifdef HIGHMEM_DEBUG
unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
unsigned int idx = type + KM_TYPE_NR*smp_processor_id(); unsigned int idx = type + KM_TYPE_NR*smp_processor_id();
......
...@@ -27,7 +27,7 @@ struct rw_semaphore { ...@@ -27,7 +27,7 @@ struct rw_semaphore {
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
spinlock_t wait_lock; spinlock_t wait_lock;
struct list_head wait_list; struct list_head wait_list;
#if RWSEM_DEBUG #ifdef RWSEM_DEBUG
int debug; int debug;
#endif #endif
}; };
...@@ -35,7 +35,7 @@ struct rw_semaphore { ...@@ -35,7 +35,7 @@ struct rw_semaphore {
/* /*
* initialisation * initialisation
*/ */
#if RWSEM_DEBUG #ifdef RWSEM_DEBUG
#define __RWSEM_DEBUG_INIT , 0 #define __RWSEM_DEBUG_INIT , 0
#else #else
#define __RWSEM_DEBUG_INIT /* */ #define __RWSEM_DEBUG_INIT /* */
...@@ -59,7 +59,7 @@ static inline void init_rwsem(struct rw_semaphore *sem) ...@@ -59,7 +59,7 @@ static inline void init_rwsem(struct rw_semaphore *sem)
sem->count = RWSEM_UNLOCKED_VALUE; sem->count = RWSEM_UNLOCKED_VALUE;
spin_lock_init(&sem->wait_lock); spin_lock_init(&sem->wait_lock);
INIT_LIST_HEAD(&sem->wait_list); INIT_LIST_HEAD(&sem->wait_list);
#if RWSEM_DEBUG #ifdef RWSEM_DEBUG
sem->debug = 0; sem->debug = 0;
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment