aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-02-16 13:36:21 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-02-22 11:59:12 -0500
commit5c9bdc3f52d20c9bc6c2552c6d3ec5bfa4119f75 (patch)
tree8380af887ca25014b867b8234ca9b6e7037d173a /drivers
parent77a5988355f993840928d195f790a939200a4ff0 (diff)
serial/sirf: fixup for changes to pin control
We changed the signature of the pin multiplexing functions to handle any pin business, so fix up the Sirf driver to call this new interface and rename some variables to make the semantics understandable. Cc: linux-serial@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.c20
-rw-r--r--drivers/tty/serial/sirfsoc_uart.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c
index a60523fee11b..c1a871eac450 100644
--- a/drivers/tty/serial/sirfsoc_uart.c
+++ b/drivers/tty/serial/sirfsoc_uart.c
@@ -22,7 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/mach/irq.h> 24#include <asm/mach/irq.h>
25#include <linux/pinctrl/pinmux.h> 25#include <linux/pinctrl/consumer.h>
26 26
27#include "sirfsoc_uart.h" 27#include "sirfsoc_uart.h"
28 28
@@ -673,12 +673,12 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
673 port->irq = res->start; 673 port->irq = res->start;
674 674
675 if (sirfport->hw_flow_ctrl) { 675 if (sirfport->hw_flow_ctrl) {
676 sirfport->pmx = pinmux_get(&pdev->dev, NULL); 676 sirfport->p = pinctrl_get(&pdev->dev, NULL);
677 ret = IS_ERR(sirfport->pmx); 677 ret = IS_ERR(sirfport->p);
678 if (ret) 678 if (ret)
679 goto pmx_err; 679 goto pin_err;
680 680
681 pinmux_enable(sirfport->pmx); 681 pinctrl_enable(sirfport->p);
682 } 682 }
683 683
684 port->ops = &sirfsoc_uart_ops; 684 port->ops = &sirfsoc_uart_ops;
@@ -696,10 +696,10 @@ int sirfsoc_uart_probe(struct platform_device *pdev)
696port_err: 696port_err:
697 platform_set_drvdata(pdev, NULL); 697 platform_set_drvdata(pdev, NULL);
698 if (sirfport->hw_flow_ctrl) { 698 if (sirfport->hw_flow_ctrl) {
699 pinmux_disable(sirfport->pmx); 699 pinctrl_disable(sirfport->p);
700 pinmux_put(sirfport->pmx); 700 pinctrl_put(sirfport->p);
701 } 701 }
702pmx_err: 702pin_err:
703irq_err: 703irq_err:
704 devm_iounmap(&pdev->dev, port->membase); 704 devm_iounmap(&pdev->dev, port->membase);
705err: 705err:
@@ -712,8 +712,8 @@ static int sirfsoc_uart_remove(struct platform_device *pdev)
712 struct uart_port *port = &sirfport->port; 712 struct uart_port *port = &sirfport->port;
713 platform_set_drvdata(pdev, NULL); 713 platform_set_drvdata(pdev, NULL);
714 if (sirfport->hw_flow_ctrl) { 714 if (sirfport->hw_flow_ctrl) {
715 pinmux_disable(sirfport->pmx); 715 pinctrl_disable(sirfport->p);
716 pinmux_put(sirfport->pmx); 716 pinctrl_put(sirfport->p);
717 } 717 }
718 devm_iounmap(&pdev->dev, port->membase); 718 devm_iounmap(&pdev->dev, port->membase);
719 uart_remove_one_port(&sirfsoc_uart_drv, port); 719 uart_remove_one_port(&sirfsoc_uart_drv, port);
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index fc64260fa93c..6e207fdc2fed 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -162,7 +162,7 @@ struct sirfsoc_uart_port {
162 unsigned char ms_enabled; 162 unsigned char ms_enabled;
163 163
164 struct uart_port port; 164 struct uart_port port;
165 struct pinmux *pmx; 165 struct pinctrl *p;
166}; 166};
167 167
168/* Hardware Flow Control */ 168/* Hardware Flow Control */