Skip to content

Commit

Permalink
serial: mxs: drop superfluous {get|put}_device
Browse files Browse the repository at this point in the history
Driver core already takes care of refcounting, no need to do this on
driver level again.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wolfram Sang authored and Greg Kroah-Hartman committed Apr 22, 2013
1 parent 4829e76 commit 4c24f2c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/tty/serial/mxs-auart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ static int mxs_auart_probe(struct platform_device *pdev)
s->port.fifosize = 16;
s->port.uartclk = clk_get_rate(s->clk);
s->port.type = PORT_IMX;
s->port.dev = s->dev = get_device(&pdev->dev);
s->port.dev = s->dev = &pdev->dev;

s->ctrl = 0;

Expand Down Expand Up @@ -1134,7 +1134,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
auart_port[pdev->id] = NULL;
free_irq(s->irq, s);
out_free_clk:
put_device(s->dev);
clk_put(s->clk);
out_free:
kfree(s);
Expand All @@ -1150,7 +1149,6 @@ static int mxs_auart_remove(struct platform_device *pdev)

auart_port[pdev->id] = NULL;

put_device(s->dev);
clk_put(s->clk);
free_irq(s->irq, s);
kfree(s);
Expand Down

0 comments on commit 4c24f2c

Please sign in to comment.