aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/cosa.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 66360a2a14c2..2eceb1a24df2 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -296,8 +296,8 @@ static ssize_t cosa_write(struct file *file,
296static unsigned int cosa_poll(struct file *file, poll_table *poll); 296static unsigned int cosa_poll(struct file *file, poll_table *poll);
297static int cosa_open(struct inode *inode, struct file *file); 297static int cosa_open(struct inode *inode, struct file *file);
298static int cosa_release(struct inode *inode, struct file *file); 298static int cosa_release(struct inode *inode, struct file *file);
299static int cosa_chardev_ioctl(struct inode *inode, struct file *file, 299static long cosa_chardev_ioctl(struct file *file, unsigned int cmd,
300 unsigned int cmd, unsigned long arg); 300 unsigned long arg);
301#ifdef COSA_FASYNC_WORKING 301#ifdef COSA_FASYNC_WORKING
302static int cosa_fasync(struct inode *inode, struct file *file, int on); 302static int cosa_fasync(struct inode *inode, struct file *file, int on);
303#endif 303#endif
@@ -308,7 +308,7 @@ static const struct file_operations cosa_fops = {
308 .read = cosa_read, 308 .read = cosa_read,
309 .write = cosa_write, 309 .write = cosa_write,
310 .poll = cosa_poll, 310 .poll = cosa_poll,
311 .ioctl = cosa_chardev_ioctl, 311 .unlocked_ioctl = cosa_chardev_ioctl,
312 .open = cosa_open, 312 .open = cosa_open,
313 .release = cosa_release, 313 .release = cosa_release,
314#ifdef COSA_FASYNC_WORKING 314#ifdef COSA_FASYNC_WORKING
@@ -1203,12 +1203,18 @@ static int cosa_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1203 return hdlc_ioctl(dev, ifr, cmd); 1203 return hdlc_ioctl(dev, ifr, cmd);
1204} 1204}
1205 1205
1206static int cosa_chardev_ioctl(struct inode *inode, struct file *file, 1206static long cosa_chardev_ioctl(struct file *file, unsigned int cmd,
1207 unsigned int cmd, unsigned long arg) 1207 unsigned long arg)
1208{ 1208{
1209 struct channel_data *channel = file->private_data; 1209 struct channel_data *channel = file->private_data;
1210 struct cosa_data *cosa = channel->cosa; 1210 struct cosa_data *cosa;
1211 return cosa_ioctl_common(cosa, channel, cmd, arg); 1211 long ret;
1212
1213 lock_kernel();
1214 cosa = channel->cosa;
1215 ret = cosa_ioctl_common(cosa, channel, cmd, arg);
1216 unlock_kernel();
1217 return ret;
1212} 1218}
1213 1219
1214 1220