[lantiq] update 3.2 patches
[openwrt.git] / target / linux / lantiq / patches-3.2 / 0030-SERIAL-MIPS-lantiq-convert-serial-driver-to-clkdev-a.patch
1 From da5f76f9eb0563597855f6b89894443d30a62d4f Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Thu, 16 Feb 2012 20:17:16 +0100
4 Subject: [PATCH 30/73] SERIAL: MIPS: lantiq: convert serial driver to clkdev
5  api
6
7 Reference the FPI clock via its new access function.
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 Cc: linux-serial@vger.kernel.org
11 ---
12  drivers/tty/serial/lantiq.c |    6 +++++-
13  1 files changed, 5 insertions(+), 1 deletions(-)
14
15 diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
16 index 5d25828..1542ad6 100644
17 --- a/drivers/tty/serial/lantiq.c
18 +++ b/drivers/tty/serial/lantiq.c
19 @@ -540,6 +540,10 @@ lqasc_request_port(struct uart_port *port)
20                 if (ltq_gpio_request(&pdev->dev, MUXC_SIF_TX_PIN,
21                                 3, 1, "asc1-tx"))
22                         return -EBUSY;
23 +               ltq_port->clk = clk_get(&pdev->dev, NULL);
24 +               if (IS_ERR(ltq_port->clk))
25 +                       return PTR_ERR(ltq_port->clk);
26 +               clk_enable(ltq_port->clk);
27         }
28         return 0;
29  }
30 @@ -698,7 +702,7 @@ lqasc_probe(struct platform_device *pdev)
31         if (lqasc_port[pdev->id] != NULL)
32                 return -EBUSY;
33  
34 -       clk = clk_get(&pdev->dev, "fpi");
35 +       clk = clk_get_fpi();
36         if (IS_ERR(clk)) {
37                 pr_err("failed to get fpi clk\n");
38                 return -ENOENT;
39 -- 
40 1.7.9.1
41