Commit bb37e97f authored by Russell King's avatar Russell King

[ARM] Fix use of #if - should be #ifdef.

parent 7508df7c
......@@ -219,8 +219,6 @@
#define _SAITR _SA1111( 0x065c )
#define _SADR _SA1111( 0x0680 )
#if LANGUAGE == C
#define SACR0 __CCREG(0x0600)
#define SACR1 __CCREG(0x0604)
#define SACR2 __CCREG(0x0608)
......@@ -246,8 +244,6 @@
#define SAITR __CCREG(0x065c)
#define SADR __CCREG(0x0680)
#endif /* LANGUAGE == C */
#define SACR0_ENB (1<<0)
#define SACR0_BCKD (1<<2)
#define SACR0_RST (1<<3)
......@@ -368,8 +364,6 @@
#define _PC_SDR _SA1111( 0x1028 )
#define _PC_SSR _SA1111( 0x102c )
#if LANGUAGE == C
#define PA_DDR __CCREG(0x1000)
#define PA_DRR __CCREG(0x1004)
#define PA_DWR __CCREG(0x1004)
......@@ -386,8 +380,6 @@
#define PC_SDR __CCREG(0x1028)
#define PC_SSR __CCREG(0x102c)
#endif /* LANGUAGE == C */
/*
* Interrupt Controller
*
......
......@@ -16,12 +16,12 @@ struct semaphore {
atomic_t count;
int sleepers;
wait_queue_head_t wait;
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
long __magic;
#endif
};
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
# define __SEM_DEBUG_INIT(name) .__magic = (long)&(name).__magic
#else
# define __SEM_DEBUG_INIT(name)
......@@ -46,7 +46,7 @@ static inline void sema_init(struct semaphore *sem, int val)
atomic_set(&sem->count, val);
sem->sleepers = 0;
init_waitqueue_head(&sem->wait);
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
sem->__magic = (long)&sem->__magic;
#endif
}
......@@ -85,7 +85,7 @@ extern void __up(struct semaphore * sem);
*/
static inline void down(struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
might_sleep();
......@@ -98,7 +98,7 @@ static inline void down(struct semaphore * sem)
*/
static inline int down_interruptible (struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
might_sleep();
......@@ -107,7 +107,7 @@ static inline int down_interruptible (struct semaphore * sem)
static inline int down_trylock(struct semaphore *sem)
{
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
......@@ -122,7 +122,7 @@ static inline int down_trylock(struct semaphore *sem)
*/
static inline void up(struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#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