Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280691
b: refs/heads/master
c: 32b4456
h: refs/heads/master
i:
  280689: 5b3da18
  280687: 04ad7f4
v: v3
  • Loading branch information
Sonic Zhang authored and Greg Kroah-Hartman committed Dec 10, 2011
1 parent 2a84cff commit 81050a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: 7962fce9a052f34390b6dab9f11df1d2e48c138d
refs/heads/master: 32b4456877319fed8d5630f3db011097fd3cf7a8
19 changes: 9 additions & 10 deletions trunk/drivers/tty/serial/bfin_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,13 @@ static int bfin_serial_startup(struct uart_port *port)
pr_info("Unable to attach BlackFin UART CTS interrupt. So, disable it.\n");
}
}
if (uart->rts_pin >= 0)
gpio_direction_output(uart->rts_pin, 0);
if (uart->rts_pin >= 0) {
if (gpio_request(uart->rts_pin, DRIVER_NAME)) {
pr_info("fail to request RTS PIN at GPIO_%d\n", uart->rts_pin);
uart->rts_pin = -1;
} else
gpio_direction_output(uart->rts_pin, 0);
}
#endif
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
if (uart->cts_pin >= 0 && request_irq(uart->status_irq,
Expand Down Expand Up @@ -792,6 +797,8 @@ static void bfin_serial_shutdown(struct uart_port *port)
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
if (uart->cts_pin >= 0)
free_irq(gpio_to_irq(uart->cts_pin), uart);
if (uart->rts_pin >= 0)
gpio_free(uart->rts_pin);
#endif
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
if (uart->cts_pin >= 0)
Expand Down Expand Up @@ -1378,10 +1385,6 @@ static int bfin_serial_probe(struct platform_device *pdev)
uart->rts_pin = -1;
else
uart->rts_pin = res->start;
# if defined(CONFIG_SERIAL_BFIN_CTSRTS)
if (uart->rts_pin >= 0)
gpio_request(uart->rts_pin, DRIVER_NAME);
# endif
#endif
}

Expand Down Expand Up @@ -1421,10 +1424,6 @@ static int __devexit bfin_serial_remove(struct platform_device *pdev)

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

0 comments on commit 81050a0

Please sign in to comment.