[package] libpcap: explicitely disable libnl support to prevent different build resul...
[openwrt.git] / target / linux / lantiq / patches-3.2 / 0029-MIPS-lantiq-convert-gpio_stp-driver-to-clkdev-api.patch
1 From 81cf50fd6cfff13e06cd587094f5094dec32d57d Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Thu, 8 Mar 2012 11:21:33 +0100
4 Subject: [PATCH 29/70] MIPS: lantiq: convert gpio_stp driver to clkdev api
5
6 Update from old pmu_{dis,en}able() to ckldev api.
7
8 Signed-off-by: John Crispin <blogic@openwrt.org>
9 ---
10 arch/mips/lantiq/xway/gpio_stp.c | 12 +++++++++---
11 1 files changed, 9 insertions(+), 3 deletions(-)
12
13 --- a/arch/mips/lantiq/xway/gpio_stp.c
14 +++ b/arch/mips/lantiq/xway/gpio_stp.c
15 @@ -15,6 +15,8 @@
16 #include <linux/mutex.h>
17 #include <linux/io.h>
18 #include <linux/gpio.h>
19 +#include <linux/clk.h>
20 +#include <linux/err.h>
21
22 #include <lantiq_soc.h>
23
24 @@ -78,8 +80,10 @@ static struct gpio_chip ltq_stp_chip = {
25 .owner = THIS_MODULE,
26 };
27
28 -static int ltq_stp_hw_init(void)
29 +static int ltq_stp_hw_init(struct device *dev)
30 {
31 + struct clk *clk;
32 +
33 /* sane defaults */
34 ltq_stp_w32(0, LTQ_STP_AR);
35 ltq_stp_w32(0, LTQ_STP_CPU0);
36 @@ -105,7 +109,9 @@ static int ltq_stp_hw_init(void)
37 */
38 ltq_stp_w32_mask(0, LTQ_STP_ADSL_SRC, LTQ_STP_CON0);
39
40 - ltq_pmu_enable(PMU_LED);
41 + clk = clk_get(dev, NULL);
42 + WARN_ON(IS_ERR(clk));
43 + clk_enable(clk);
44 return 0;
45 }
46
47 @@ -138,7 +144,7 @@ static int __devinit ltq_stp_probe(struc
48 }
49 ret = gpiochip_add(&ltq_stp_chip);
50 if (!ret)
51 - ret = ltq_stp_hw_init();
52 + ret = ltq_stp_hw_init(&pdev->dev);
53
54 return ret;
55 }
This page took 0.047412 seconds and 5 git commands to generate.