diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index b5fabc7019d8..e7462924b505 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -124,18 +124,6 @@ mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off) | |||
124 | return ret; | 124 | return ret; |
125 | } | 125 | } |
126 | 126 | ||
127 | static loff_t | ||
128 | mISDN_llseek(struct file *filep, loff_t offset, int orig) | ||
129 | { | ||
130 | return -ESPIPE; | ||
131 | } | ||
132 | |||
133 | static ssize_t | ||
134 | mISDN_write(struct file *filep, const char *buf, size_t count, loff_t *off) | ||
135 | { | ||
136 | return -EOPNOTSUPP; | ||
137 | } | ||
138 | |||
139 | static unsigned int | 127 | static unsigned int |
140 | mISDN_poll(struct file *filep, poll_table *wait) | 128 | mISDN_poll(struct file *filep, poll_table *wait) |
141 | { | 129 | { |
@@ -157,8 +145,9 @@ mISDN_poll(struct file *filep, poll_table *wait) | |||
157 | } | 145 | } |
158 | 146 | ||
159 | static void | 147 | static void |
160 | dev_expire_timer(struct mISDNtimer *timer) | 148 | dev_expire_timer(unsigned long data) |
161 | { | 149 | { |
150 | struct mISDNtimer *timer = (void *)data; | ||
162 | u_long flags; | 151 | u_long flags; |
163 | 152 | ||
164 | spin_lock_irqsave(&timer->dev->lock, flags); | 153 | spin_lock_irqsave(&timer->dev->lock, flags); |
@@ -191,7 +180,7 @@ misdn_add_timer(struct mISDNtimerdev *dev, int timeout) | |||
191 | spin_unlock_irqrestore(&dev->lock, flags); | 180 | spin_unlock_irqrestore(&dev->lock, flags); |
192 | timer->dev = dev; | 181 | timer->dev = dev; |
193 | timer->tl.data = (long)timer; | 182 | timer->tl.data = (long)timer; |
194 | timer->tl.function = (void *) dev_expire_timer; | 183 | timer->tl.function = dev_expire_timer; |
195 | init_timer(&timer->tl); | 184 | init_timer(&timer->tl); |
196 | timer->tl.expires = jiffies + ((HZ * (u_long)timeout) / 1000); | 185 | timer->tl.expires = jiffies + ((HZ * (u_long)timeout) / 1000); |
197 | add_timer(&timer->tl); | 186 | add_timer(&timer->tl); |
@@ -211,6 +200,9 @@ misdn_del_timer(struct mISDNtimerdev *dev, int id) | |||
211 | list_for_each_entry(timer, &dev->pending, list) { | 200 | list_for_each_entry(timer, &dev->pending, list) { |
212 | if (timer->id == id) { | 201 | if (timer->id == id) { |
213 | list_del_init(&timer->list); | 202 | list_del_init(&timer->list); |
203 | /* RED-PEN AK: race -- timer can be still running on | ||
204 | * other CPU. Needs reference count I think | ||
205 | */ | ||
214 | del_timer(&timer->tl); | 206 | del_timer(&timer->tl); |
215 | ret = timer->id; | 207 | ret = timer->id; |
216 | kfree(timer); | 208 | kfree(timer); |
@@ -268,9 +260,7 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
268 | } | 260 | } |
269 | 261 | ||
270 | static struct file_operations mISDN_fops = { | 262 | static struct file_operations mISDN_fops = { |
271 | .llseek = mISDN_llseek, | ||
272 | .read = mISDN_read, | 263 | .read = mISDN_read, |
273 | .write = mISDN_write, | ||
274 | .poll = mISDN_poll, | 264 | .poll = mISDN_poll, |
275 | .ioctl = mISDN_ioctl, | 265 | .ioctl = mISDN_ioctl, |
276 | .open = mISDN_open, | 266 | .open = mISDN_open, |