diff options
Diffstat (limited to 'drivers/tty/serial/sirfsoc_uart.c')
-rw-r--r-- | drivers/tty/serial/sirfsoc_uart.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c index a60523fee11b..5b3eda2024fe 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,10 @@ 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_select_default(&pdev->dev); |
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 | |||
681 | pinmux_enable(sirfport->pmx); | ||
682 | } | 680 | } |
683 | 681 | ||
684 | port->ops = &sirfsoc_uart_ops; | 682 | port->ops = &sirfsoc_uart_ops; |
@@ -695,11 +693,9 @@ int sirfsoc_uart_probe(struct platform_device *pdev) | |||
695 | 693 | ||
696 | port_err: | 694 | port_err: |
697 | platform_set_drvdata(pdev, NULL); | 695 | platform_set_drvdata(pdev, NULL); |
698 | if (sirfport->hw_flow_ctrl) { | 696 | if (sirfport->hw_flow_ctrl) |
699 | pinmux_disable(sirfport->pmx); | 697 | pinctrl_put(sirfport->p); |
700 | pinmux_put(sirfport->pmx); | 698 | pin_err: |
701 | } | ||
702 | pmx_err: | ||
703 | irq_err: | 699 | irq_err: |
704 | devm_iounmap(&pdev->dev, port->membase); | 700 | devm_iounmap(&pdev->dev, port->membase); |
705 | err: | 701 | err: |
@@ -711,10 +707,8 @@ static int sirfsoc_uart_remove(struct platform_device *pdev) | |||
711 | struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev); | 707 | struct sirfsoc_uart_port *sirfport = platform_get_drvdata(pdev); |
712 | struct uart_port *port = &sirfport->port; | 708 | struct uart_port *port = &sirfport->port; |
713 | platform_set_drvdata(pdev, NULL); | 709 | platform_set_drvdata(pdev, NULL); |
714 | if (sirfport->hw_flow_ctrl) { | 710 | if (sirfport->hw_flow_ctrl) |
715 | pinmux_disable(sirfport->pmx); | 711 | pinctrl_put(sirfport->p); |
716 | pinmux_put(sirfport->pmx); | ||
717 | } | ||
718 | devm_iounmap(&pdev->dev, port->membase); | 712 | devm_iounmap(&pdev->dev, port->membase); |
719 | uart_remove_one_port(&sirfsoc_uart_drv, port); | 713 | uart_remove_one_port(&sirfsoc_uart_drv, port); |
720 | return 0; | 714 | return 0; |