Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354836
b: refs/heads/master
c: 9429ccb
h: refs/heads/master
v: v3
  • Loading branch information
Yi Zhang authored and Greg Kroah-Hartman committed Jan 25, 2013
1 parent 85334e4 commit 367057f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: e8c5b56fdca7bb3006914f0bf7d09b4d64254172
refs/heads/master: 9429ccbf386c9fce9d998a96474a0926391208cf
12 changes: 11 additions & 1 deletion trunk/drivers/tty/serial/pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
unsigned long flags;
int locked = 1;


clk_enable(up->clk);
local_irq_save(flags);
if (up->port.sysrq)
locked = 0;
Expand All @@ -699,6 +699,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
if (locked)
spin_unlock(&up->port.lock);
local_irq_restore(flags);
clk_disable(up->clk);

}

Expand Down Expand Up @@ -896,6 +897,12 @@ static int serial_pxa_probe(struct platform_device *dev)
goto err_free;
}

ret = clk_prepare(sport->clk);
if (ret) {
clk_put(sport->clk);
goto err_free;
}

sport->port.type = PORT_PXA;
sport->port.iotype = UPIO_MEM;
sport->port.mapbase = mmres->start;
Expand Down Expand Up @@ -927,6 +934,7 @@ static int serial_pxa_probe(struct platform_device *dev)
return 0;

err_clk:
clk_unprepare(sport->clk);
clk_put(sport->clk);
err_free:
kfree(sport);
Expand All @@ -940,6 +948,8 @@ static int serial_pxa_remove(struct platform_device *dev)
platform_set_drvdata(dev, NULL);

uart_remove_one_port(&serial_pxa_reg, &sport->port);

clk_unprepare(sport->clk);
clk_put(sport->clk);
kfree(sport);

Expand Down

0 comments on commit 367057f

Please sign in to comment.