Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111761
b: refs/heads/master
c: ce425a9
h: refs/heads/master
i:
  111759: f2f4105
v: v3
  • Loading branch information
Andi Kleen authored and David S. Miller committed Sep 23, 2008
1 parent 89d7748 commit 074426a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1532dcb75c238d79c54a037da87c3f495cbf605b
refs/heads/master: ce425a9f2c0182e9a9e49c7dc18699f2db4c3f48
22 changes: 6 additions & 16 deletions trunk/drivers/isdn/mISDN/timerdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,6 @@ mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off)
return ret;
}

static loff_t
mISDN_llseek(struct file *filep, loff_t offset, int orig)
{
return -ESPIPE;
}

static ssize_t
mISDN_write(struct file *filep, const char *buf, size_t count, loff_t *off)
{
return -EOPNOTSUPP;
}

static unsigned int
mISDN_poll(struct file *filep, poll_table *wait)
{
Expand All @@ -157,8 +145,9 @@ mISDN_poll(struct file *filep, poll_table *wait)
}

static void
dev_expire_timer(struct mISDNtimer *timer)
dev_expire_timer(unsigned long data)
{
struct mISDNtimer *timer = (void *)data;
u_long flags;

spin_lock_irqsave(&timer->dev->lock, flags);
Expand Down Expand Up @@ -191,7 +180,7 @@ misdn_add_timer(struct mISDNtimerdev *dev, int timeout)
spin_unlock_irqrestore(&dev->lock, flags);
timer->dev = dev;
timer->tl.data = (long)timer;
timer->tl.function = (void *) dev_expire_timer;
timer->tl.function = dev_expire_timer;
init_timer(&timer->tl);
timer->tl.expires = jiffies + ((HZ * (u_long)timeout) / 1000);
add_timer(&timer->tl);
Expand All @@ -211,6 +200,9 @@ misdn_del_timer(struct mISDNtimerdev *dev, int id)
list_for_each_entry(timer, &dev->pending, list) {
if (timer->id == id) {
list_del_init(&timer->list);
/* RED-PEN AK: race -- timer can be still running on
* other CPU. Needs reference count I think
*/
del_timer(&timer->tl);
ret = timer->id;
kfree(timer);
Expand Down Expand Up @@ -268,9 +260,7 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
}

static struct file_operations mISDN_fops = {
.llseek = mISDN_llseek,
.read = mISDN_read,
.write = mISDN_write,
.poll = mISDN_poll,
.ioctl = mISDN_ioctl,
.open = mISDN_open,
Expand Down

0 comments on commit 074426a

Please sign in to comment.