Commit 58cf41984a3791e7a516641f107ff70bd844ef72

Authored by Adrian Bunk
Committed by Wim Van Sebroeck
1 parent f8494e0617

[WATCHDOG] fix watchdog/shwdt.c compilation

This patch fixes the following compile errors caused by
commit 70b814ec1a484279a51bf9f7193551b996627247
([WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_io):

<--  snip  -->

...
  CC      drivers/watchdog/shwdt.o
shwdt.c:64: error: 'WTCSR_CKS_4096' undeclared here (not in a function)
shwdt.c: In function 'sh_wdt_start':
shwdt.c:92: error: 'wdt_lock' undeclared (first use in this function)
shwdt.c:92: error: (Each undeclared identifier is reported only once
shwdt.c:92: error: for each function it appears in.)
shwdt.c:97: error: implicit declaration of function 'sh_wdt_read_csr'
shwdt.c:98: error: 'WTCSR_WT' undeclared (first use in this function)
shwdt.c:99: error: implicit declaration of function 'sh_wdt_write_csr'
shwdt.c:101: error: implicit declaration of function 'sh_wdt_write_cnt'
shwdt.c:112: error: 'WTCSR_TME' undeclared (first use in this function)
shwdt.c:113: error: 'WTCSR_RSTS' undeclared (first use in this function)
shwdt.c: In function 'sh_wdt_stop':
shwdt.c:142: error: 'wdt_lock' undeclared (first use in this function)
shwdt.c:147: error: 'WTCSR_TME' undeclared (first use in this function)
shwdt.c: In function 'sh_wdt_keepalive':
shwdt.c:160: error: 'wdt_lock' undeclared (first use in this function)
shwdt.c: In function 'sh_wdt_set_heartbeat':
shwdt.c:176: error: 'wdt_lock' undeclared (first use in this function)
shwdt.c: In function 'sh_wdt_ping':
shwdt.c:192: error: 'wdt_lock' undeclared (first use in this function)
shwdt.c:197: error: 'WTCSR_IOVF' undeclared (first use in this function)
shwdt.c: At top level:
shwdt.c:417: error: conflicting type qualifiers for 'sh_wdt_info'
shwdt.c:71: error: previous declaration of 'sh_wdt_info' was here
make[3]: *** [drivers/watchdog/shwdt.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

Showing 1 changed file with 12 additions and 12 deletions Side-by-side Diff

drivers/watchdog/shwdt.c
... ... @@ -30,7 +30,7 @@
30 30 #include <linux/mm.h>
31 31 #include <linux/io.h>
32 32 #include <linux/uaccess.h>
33   -#include <linux/watchdog.h>
  33 +#include <asm/watchdog.h>
34 34  
35 35 #define PFX "shwdt: "
36 36  
... ... @@ -68,7 +68,7 @@
68 68 static void sh_wdt_ping(unsigned long data);
69 69  
70 70 static unsigned long shwdt_is_open;
71   -static struct watchdog_info sh_wdt_info;
  71 +static const struct watchdog_info sh_wdt_info;
72 72 static char shwdt_expect_close;
73 73 static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0);
74 74 static unsigned long next_heartbeat;
... ... @@ -89,7 +89,7 @@
89 89 __u8 csr;
90 90 unsigned long flags;
91 91  
92   - spin_lock_irqsave(&wdt_lock, flags);
  92 + spin_lock_irqsave(&shwdt_lock, flags);
93 93  
94 94 next_heartbeat = jiffies + (heartbeat * HZ);
95 95 mod_timer(&timer, next_ping_period(clock_division_ratio));
... ... @@ -127,7 +127,7 @@
127 127 csr &= ~RSTCSR_RSTS;
128 128 sh_wdt_write_rstcsr(csr);
129 129 #endif
130   - spin_unlock_irqrestore(&wdt_lock, flags);
  130 + spin_unlock_irqrestore(&shwdt_lock, flags);
131 131 }
132 132  
133 133 /**
134 134  
... ... @@ -139,14 +139,14 @@
139 139 __u8 csr;
140 140 unsigned long flags;
141 141  
142   - spin_lock_irqsave(&wdt_lock, flags);
  142 + spin_lock_irqsave(&shwdt_lock, flags);
143 143  
144 144 del_timer(&timer);
145 145  
146 146 csr = sh_wdt_read_csr();
147 147 csr &= ~WTCSR_TME;
148 148 sh_wdt_write_csr(csr);
149   - spin_unlock_irqrestore(&wdt_lock, flags);
  149 + spin_unlock_irqrestore(&shwdt_lock, flags);
150 150 }
151 151  
152 152 /**
153 153  
... ... @@ -157,9 +157,9 @@
157 157 {
158 158 unsigned long flags;
159 159  
160   - spin_lock_irqsave(&wdt_lock, flags);
  160 + spin_lock_irqsave(&shwdt_lock, flags);
161 161 next_heartbeat = jiffies + (heartbeat * HZ);
162   - spin_unlock_irqrestore(&wdt_lock, flags);
  162 + spin_unlock_irqrestore(&shwdt_lock, flags);
163 163 }
164 164  
165 165 /**
166 166  
... ... @@ -173,9 +173,9 @@
173 173 if (unlikely(t < 1 || t > 3600)) /* arbitrary upper limit */
174 174 return -EINVAL;
175 175  
176   - spin_lock_irqsave(&wdt_lock, flags);
  176 + spin_lock_irqsave(&shwdt_lock, flags);
177 177 heartbeat = t;
178   - spin_unlock_irqrestore(&wdt_lock, flags);
  178 + spin_unlock_irqrestore(&shwdt_lock, flags);
179 179 return 0;
180 180 }
181 181  
... ... @@ -189,7 +189,7 @@
189 189 {
190 190 unsigned long flags;
191 191  
192   - spin_lock_irqsave(&wdt_lock, flags);
  192 + spin_lock_irqsave(&shwdt_lock, flags);
193 193 if (time_before(jiffies, next_heartbeat)) {
194 194 __u8 csr;
195 195  
... ... @@ -203,7 +203,7 @@
203 203 } else
204 204 printk(KERN_WARNING PFX "Heartbeat lost! Will not ping "
205 205 "the watchdog\n");
206   - spin_unlock_irqrestore(&wdt_lock, flags);
  206 + spin_unlock_irqrestore(&shwdt_lock, flags);
207 207 }
208 208  
209 209 /**