Skip to content

Commit

Permalink
spi/pl022: convert busy flag to a bool
Browse files Browse the repository at this point in the history
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Linus Walleij authored and Grant Likely committed Dec 24, 2010
1 parent 082086f commit dec5a58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/spi/amba-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ struct pl022 {
struct work_struct pump_messages;
spinlock_t queue_lock;
struct list_head queue;
int busy;
bool busy;
int run;
/* Message transfer pump */
struct tasklet_struct pump_transfers;
Expand Down Expand Up @@ -1461,7 +1461,7 @@ static void pump_messages(struct work_struct *work)
/* Lock queue and check for queue work */
spin_lock_irqsave(&pl022->queue_lock, flags);
if (list_empty(&pl022->queue) || pl022->run == QUEUE_STOPPED) {
pl022->busy = 0;
pl022->busy = false;
spin_unlock_irqrestore(&pl022->queue_lock, flags);
return;
}
Expand All @@ -1475,7 +1475,7 @@ static void pump_messages(struct work_struct *work)
list_entry(pl022->queue.next, struct spi_message, queue);

list_del_init(&pl022->cur_msg->queue);
pl022->busy = 1;
pl022->busy = true;
spin_unlock_irqrestore(&pl022->queue_lock, flags);

/* Initial message state */
Expand Down Expand Up @@ -1508,7 +1508,7 @@ static int __init init_queue(struct pl022 *pl022)
spin_lock_init(&pl022->queue_lock);

pl022->run = QUEUE_STOPPED;
pl022->busy = 0;
pl022->busy = false;

tasklet_init(&pl022->pump_transfers,
pump_transfers, (unsigned long)pl022);
Expand Down

0 comments on commit dec5a58

Please sign in to comment.