Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201129
b: refs/heads/master
c: 9616ff4
h: refs/heads/master
i:
  201127: b6f7eb5
v: v3
  • Loading branch information
David S. Miller committed May 27, 2010
1 parent 121a2df commit ce4281b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 7c1f6afcf98fe95fb3f2b70ce01cf66f6db53b5e
refs/heads/master: 9616ff434d96303689391af3d6e1c845d233405f
13 changes: 9 additions & 4 deletions trunk/drivers/serial/sunsu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,20 +1500,25 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
static int __devexit su_remove(struct of_device *op)
{
struct uart_sunsu_port *up = dev_get_drvdata(&op->dev);
bool kbdms = false;

if (up->su_type == SU_PORT_MS ||
up->su_type == SU_PORT_KBD) {
up->su_type == SU_PORT_KBD)
kbdms = true;

if (kbdms) {
#ifdef CONFIG_SERIO
serio_unregister_port(&up->serio);
#endif
kfree(up);
} else if (up->port.type != PORT_UNKNOWN) {
} else if (up->port.type != PORT_UNKNOWN)
uart_remove_one_port(&sunsu_reg, &up->port);
}

if (up->port.membase)
of_iounmap(&op->resource[0], up->port.membase, up->reg_size);

if (kbdms)
kfree(up);

dev_set_drvdata(&op->dev, NULL);

return 0;
Expand Down

0 comments on commit ce4281b

Please sign in to comment.