Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280695
b: refs/heads/master
c: dc8f370
h: refs/heads/master
i:
  280693: 2d61849
  280691: 81050a0
  280687: 04ad7f4
v: v3
  • Loading branch information
Sonic Zhang authored and Greg Kroah-Hartman committed Dec 10, 2011
1 parent bb3dab6 commit 3b74697
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 07143eaefd025098089edee7047714f6604a4a21
refs/heads/master: dc8f3703e733f4f48553076c8615aeb004351662
18 changes: 9 additions & 9 deletions trunk/drivers/tty/serial/bfin_sport_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,13 @@ static int sport_startup(struct uart_port *port)
dev_info(port->dev, "Unable to attach BlackFin UART over SPORT CTS interrupt. So, disable it.\n");
}
}
if (up->rts_pin >= 0)
gpio_direction_output(up->rts_pin, 0);
if (up->rts_pin >= 0) {
if (gpio_request(up->rts_pin, DRV_NAME)) {
dev_info(port->dev, "fail to request RTS PIN at GPIO_%d\n", up->rts_pin);
up->rts_pin = -1;
} else
gpio_direction_output(up->rts_pin, 0);
}
#endif

return 0;
Expand Down Expand Up @@ -445,6 +450,8 @@ static void sport_shutdown(struct uart_port *port)
#ifdef CONFIG_SERIAL_BFIN_SPORT_CTSRTS
if (up->cts_pin >= 0)
free_irq(gpio_to_irq(up->cts_pin), up);
if (up->rts_pin >= 0)
gpio_free(up->rts_pin);
#endif
}

Expand Down Expand Up @@ -811,9 +818,6 @@ static int __devinit sport_uart_probe(struct platform_device *pdev)
sport->rts_pin = -1;
else
sport->rts_pin = res->start;

if (sport->rts_pin >= 0)
gpio_request(sport->rts_pin, DRV_NAME);
#endif
}

Expand Down Expand Up @@ -853,10 +857,6 @@ static int __devexit sport_uart_remove(struct platform_device *pdev)

if (sport) {
uart_remove_one_port(&sport_uart_reg, &sport->port);
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
if (sport->rts_pin >= 0)
gpio_free(sport->rts_pin);
#endif
iounmap(sport->port.membase);
peripheral_free_list(
(unsigned short *)pdev->dev.platform_data);
Expand Down

0 comments on commit 3b74697

Please sign in to comment.