kernel: update bcma and ssb to master-2012-12-11-2 from wireless-testing
[openwrt/svn-archive/archive.git] / target / linux / brcm47xx / patches-3.6 / 542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch
1 --- a/drivers/watchdog/bcm47xx_wdt.c
2 +++ b/drivers/watchdog/bcm47xx_wdt.c
3 @@ -30,7 +30,7 @@
4 #define DRV_NAME "bcm47xx_wdt"
5
6 #define WDT_DEFAULT_TIME 30 /* seconds */
7 -#define WDT_MAX_TIME 255 /* seconds */
8 +#define WDT_SOFTTIMER_MAX 255 /* seconds */
9
10 static int wdt_time = WDT_DEFAULT_TIME;
11 static bool nowayout = WATCHDOG_NOWAYOUT;
12 @@ -49,7 +49,7 @@ static inline struct bcm47xx_wdt *bcm47x
13 return container_of(wdd, struct bcm47xx_wdt, wdd);
14 }
15
16 -static void bcm47xx_timer_tick(unsigned long data)
17 +static void bcm47xx_wdt_soft_timer_tick(unsigned long data)
18 {
19 struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data;
20 u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms);
21 @@ -62,7 +62,7 @@ static void bcm47xx_timer_tick(unsigned
22 }
23 }
24
25 -static int bcm47xx_wdt_keepalive(struct watchdog_device *wdd)
26 +static int bcm47xx_wdt_soft_keepalive(struct watchdog_device *wdd)
27 {
28 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
29
30 @@ -71,17 +71,17 @@ static int bcm47xx_wdt_keepalive(struct
31 return 0;
32 }
33
34 -static int bcm47xx_wdt_start(struct watchdog_device *wdd)
35 +static int bcm47xx_wdt_soft_start(struct watchdog_device *wdd)
36 {
37 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
38
39 - bcm47xx_wdt_keepalive(wdd);
40 - bcm47xx_timer_tick((unsigned long)wdt);
41 + bcm47xx_wdt_soft_keepalive(wdd);
42 + bcm47xx_wdt_soft_timer_tick((unsigned long)wdt);
43
44 return 0;
45 }
46
47 -static int bcm47xx_wdt_stop(struct watchdog_device *wdd)
48 +static int bcm47xx_wdt_soft_stop(struct watchdog_device *wdd)
49 {
50 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
51
52 @@ -91,12 +91,12 @@ static int bcm47xx_wdt_stop(struct watch
53 return 0;
54 }
55
56 -static int bcm47xx_wdt_set_timeout(struct watchdog_device *wdd,
57 - unsigned int new_time)
58 +static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd,
59 + unsigned int new_time)
60 {
61 - if (new_time < 1 || new_time > WDT_MAX_TIME) {
62 + if (new_time < 1 || new_time > WDT_SOFTTIMER_MAX) {
63 pr_warn("timeout value must be 1<=x<=%d, using %d\n",
64 - WDT_MAX_TIME, new_time);
65 + WDT_SOFTTIMER_MAX, new_time);
66 return -EINVAL;
67 }
68
69 @@ -122,12 +122,12 @@ static int bcm47xx_wdt_notify_sys(struct
70 return NOTIFY_DONE;
71 }
72
73 -static struct watchdog_ops bcm47xx_wdt_ops = {
74 +static struct watchdog_ops bcm47xx_wdt_soft_ops = {
75 .owner = THIS_MODULE,
76 - .start = bcm47xx_wdt_start,
77 - .stop = bcm47xx_wdt_stop,
78 - .ping = bcm47xx_wdt_keepalive,
79 - .set_timeout = bcm47xx_wdt_set_timeout,
80 + .start = bcm47xx_wdt_soft_start,
81 + .stop = bcm47xx_wdt_soft_stop,
82 + .ping = bcm47xx_wdt_soft_keepalive,
83 + .set_timeout = bcm47xx_wdt_soft_set_timeout,
84 };
85
86 static int __devinit bcm47xx_wdt_probe(struct platform_device *pdev)
87 @@ -138,10 +138,10 @@ static int __devinit bcm47xx_wdt_probe(s
88 if (!wdt)
89 return -ENXIO;
90
91 - setup_timer(&wdt->soft_timer, bcm47xx_timer_tick,
92 + setup_timer(&wdt->soft_timer, bcm47xx_wdt_soft_timer_tick,
93 (long unsigned int)wdt);
94
95 - wdt->wdd.ops = &bcm47xx_wdt_ops;
96 + wdt->wdd.ops = &bcm47xx_wdt_soft_ops;
97 wdt->wdd.info = &bcm47xx_wdt_info;
98 wdt->wdd.timeout = WDT_DEFAULT_TIME;
99 ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout);