diff options
-rw-r--r-- | firmware/export/kernel.h | 6 | ||||
-rw-r--r-- | firmware/kernel.c | 5 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/i2c-meg-fx.c | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h index 337f249dfe..e9f2bfcbaa 100644 --- a/firmware/export/kernel.h +++ b/firmware/export/kernel.h @@ -240,9 +240,9 @@ void timeout_cancel(struct timeout *tmo); #define STATE_NONSIGNALED 0 #define STATE_SIGNALED 1 -#define WAIT_TIMEDOUT (-1) -#define WAIT_FAILED 0 -#define WAIT_SUCCEEDED 1 +#define OBJ_WAIT_TIMEDOUT (-1) +#define OBJ_WAIT_FAILED 0 +#define OBJ_WAIT_SUCCEEDED 1 extern void queue_init(struct event_queue *q, bool register_queue); extern void queue_delete(struct event_queue *q); diff --git a/firmware/kernel.c b/firmware/kernel.c index 439aea584a..1882855985 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c @@ -1386,7 +1386,7 @@ void wakeup_init(struct wakeup *w) /* Wait for a signal blocking indefinitely or for a specified period */ int wakeup_wait(struct wakeup *w, int timeout) { - int ret = WAIT_SUCCEEDED; /* Presume success */ + int ret = OBJ_WAIT_SUCCEEDED; /* Presume success */ int oldlevel = disable_irq_save(); corelock_lock(&w->cl); @@ -1413,7 +1413,8 @@ int wakeup_wait(struct wakeup *w, int timeout) if(w->signalled == 0) { /* Timed-out or failed */ - ret = (timeout != TIMEOUT_BLOCK) ? WAIT_TIMEDOUT : WAIT_FAILED; + ret = (timeout != TIMEOUT_BLOCK) ? + OBJ_WAIT_TIMEDOUT : OBJ_WAIT_FAILED; } w->signalled = 0; /* Reset */ diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/i2c-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/i2c-meg-fx.c index c5d23a3673..4fbbea84a1 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/i2c-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/i2c-meg-fx.c @@ -62,7 +62,7 @@ void i2c_write(int addr, const unsigned char *buf, int count) /* Generate START */ IICSTAT = I2C_MODE_MASTER | I2C_MODE_TX | I2C_START | I2C_RXTX_ENB; - if (wakeup_wait(&i2c_wake, HZ) != WAIT_SUCCEEDED) + if (wakeup_wait(&i2c_wake, HZ) != OBJ_WAIT_SUCCEEDED) { /* Something went wrong - stop transmission */ int oldlevel = disable_irq_save(); |