Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354833
b: refs/heads/master
c: ebcf098
h: refs/heads/master
i:
  354831: 3577fa7
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jan 25, 2013
1 parent ca604ef commit f5fd950
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb51d917a7e6b7d5ce1a58941f4a5840ac06553a
refs/heads/master: ebcf09816c68d1082aec5a2646e9f20715384502
19 changes: 7 additions & 12 deletions trunk/drivers/tty/goldfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,18 @@ static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id)
unsigned long irq_flags;
unsigned char *buf;
u32 count;
struct tty_struct *tty;

count = readl(base + GOLDFISH_TTY_BYTES_READY);
if(count == 0)
return IRQ_NONE;

tty = tty_port_tty_get(&qtty->port);
if (tty) {
count = tty_prepare_flip_string(tty, &buf, count);
spin_lock_irqsave(&qtty->lock, irq_flags);
writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR);
writel(count, base + GOLDFISH_TTY_DATA_LEN);
writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
spin_unlock_irqrestore(&qtty->lock, irq_flags);
tty_schedule_flip(tty);
tty_kref_put(tty);
}
count = tty_prepare_flip_string(&qtty->port, &buf, count);
spin_lock_irqsave(&qtty->lock, irq_flags);
writel((u32)buf, base + GOLDFISH_TTY_DATA_PTR);
writel(count, base + GOLDFISH_TTY_DATA_LEN);
writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
spin_unlock_irqrestore(&qtty->lock, irq_flags);
tty_schedule_flip(&qtty->port);
return IRQ_HANDLED;
}

Expand Down

0 comments on commit f5fd950

Please sign in to comment.