Skip to content

Commit

Permalink
cosa: Kill off the use of the old ioctl path
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alan Cox authored and David S. Miller committed Oct 19, 2009
1 parent 8edf19c commit 2395f0e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions drivers/net/wan/cosa.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ static ssize_t cosa_write(struct file *file,
static unsigned int cosa_poll(struct file *file, poll_table *poll);
static int cosa_open(struct inode *inode, struct file *file);
static int cosa_release(struct inode *inode, struct file *file);
static int cosa_chardev_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
static long cosa_chardev_ioctl(struct file *file, unsigned int cmd,
unsigned long arg);
#ifdef COSA_FASYNC_WORKING
static int cosa_fasync(struct inode *inode, struct file *file, int on);
#endif
Expand All @@ -308,7 +308,7 @@ static const struct file_operations cosa_fops = {
.read = cosa_read,
.write = cosa_write,
.poll = cosa_poll,
.ioctl = cosa_chardev_ioctl,
.unlocked_ioctl = cosa_chardev_ioctl,
.open = cosa_open,
.release = cosa_release,
#ifdef COSA_FASYNC_WORKING
Expand Down Expand Up @@ -1203,12 +1203,18 @@ static int cosa_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return hdlc_ioctl(dev, ifr, cmd);
}

static int cosa_chardev_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
static long cosa_chardev_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct channel_data *channel = file->private_data;
struct cosa_data *cosa = channel->cosa;
return cosa_ioctl_common(cosa, channel, cmd, arg);
struct cosa_data *cosa;
long ret;

lock_kernel();
cosa = channel->cosa;
ret = cosa_ioctl_common(cosa, channel, cmd, arg);
unlock_kernel();
return ret;
}


Expand Down

0 comments on commit 2395f0e

Please sign in to comment.