Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338375
b: refs/heads/master
c: 135cc79
h: refs/heads/master
i:
  338373: 9af4f8d
  338371: eaf87de
  338367: c3036f4
v: v3
  • Loading branch information
Alexander Shiyan authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent e7a4dfc commit b39da69
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 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: f27de95c2a2120526c8cb051d741b7eb09e78cc9
refs/heads/master: 135cc7903593af78c45dc3f8e6a1f528f083e002
39 changes: 17 additions & 22 deletions trunk/drivers/tty/serial/clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void clps711xuart_enable_ms(struct uart_port *port)
{
}

static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id)
static irqreturn_t uart_clps711x_int_rx(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
struct tty_struct *tty = tty_port_tty_get(&port->state->port);
Expand Down Expand Up @@ -149,7 +149,7 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id)
return IRQ_HANDLED;
}

static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
static irqreturn_t uart_clps711x_int_tx(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
struct clps711x_port *s = dev_get_drvdata(port->dev);
Expand Down Expand Up @@ -232,23 +232,20 @@ static int clps711xuart_startup(struct uart_port *port)
{
struct clps711x_port *s = dev_get_drvdata(port->dev);
unsigned int syscon;
int retval;
int ret;

s->tx_enabled[port->line] = 1;

/*
* Allocate the IRQs
*/
retval = request_irq(TX_IRQ(port), clps711xuart_int_tx, 0,
"clps711xuart_tx", port);
if (retval)
return retval;

retval = request_irq(RX_IRQ(port), clps711xuart_int_rx, 0,
"clps711xuart_rx", port);
if (retval) {
free_irq(TX_IRQ(port), port);
return retval;
/* Allocate the IRQs */
ret = devm_request_irq(port->dev, TX_IRQ(port), uart_clps711x_int_tx,
0, UART_CLPS711X_NAME " TX", port);
if (ret)
return ret;

ret = devm_request_irq(port->dev, RX_IRQ(port), uart_clps711x_int_rx,
0, UART_CLPS711X_NAME " RX", port);
if (ret) {
devm_free_irq(port->dev, TX_IRQ(port), port);
return ret;
}

/*
Expand All @@ -265,11 +262,9 @@ static void clps711xuart_shutdown(struct uart_port *port)
{
unsigned int ubrlcr, syscon;

/*
* Free the interrupt
*/
free_irq(TX_IRQ(port), port); /* TX interrupt */
free_irq(RX_IRQ(port), port); /* RX interrupt */
/* Free the interrupts */
devm_free_irq(port->dev, TX_IRQ(port), port);
devm_free_irq(port->dev, RX_IRQ(port), port);

/*
* disable the port
Expand Down

0 comments on commit b39da69

Please sign in to comment.