Commit 16ef8def authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Frederic Weisbecker

dvb: Push down BKL into ioctl functions

This requires changing all users of dvb_usercopy to
omit the inode argument.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
parent ce8273a5
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/smp_lock.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/wait.h> #include <linux/wait.h>
...@@ -963,7 +964,7 @@ dvb_demux_read(struct file *file, char __user *buf, size_t count, ...@@ -963,7 +964,7 @@ dvb_demux_read(struct file *file, char __user *buf, size_t count,
return ret; return ret;
} }
static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, static int dvb_demux_do_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dmxdev_filter *dmxdevfilter = file->private_data; struct dmxdev_filter *dmxdevfilter = file->private_data;
...@@ -1084,10 +1085,16 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, ...@@ -1084,10 +1085,16 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
return ret; return ret;
} }
static int dvb_demux_ioctl(struct inode *inode, struct file *file, static long dvb_demux_ioctl(struct file *file, unsigned int cmd,
unsigned int cmd, unsigned long arg) unsigned long arg)
{ {
return dvb_usercopy(inode, file, cmd, arg, dvb_demux_do_ioctl); int ret;
lock_kernel();
ret = dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl);
unlock_kernel();
return ret;
} }
static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) static unsigned int dvb_demux_poll(struct file *file, poll_table *wait)
...@@ -1139,7 +1146,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file) ...@@ -1139,7 +1146,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file)
static const struct file_operations dvb_demux_fops = { static const struct file_operations dvb_demux_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_demux_read, .read = dvb_demux_read,
.ioctl = dvb_demux_ioctl, .unlocked_ioctl = dvb_demux_ioctl,
.open = dvb_demux_open, .open = dvb_demux_open,
.release = dvb_demux_release, .release = dvb_demux_release,
.poll = dvb_demux_poll, .poll = dvb_demux_poll,
...@@ -1152,7 +1159,7 @@ static struct dvb_device dvbdev_demux = { ...@@ -1152,7 +1159,7 @@ static struct dvb_device dvbdev_demux = {
.fops = &dvb_demux_fops .fops = &dvb_demux_fops
}; };
static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, static int dvb_dvr_do_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1176,10 +1183,16 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, ...@@ -1176,10 +1183,16 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
return ret; return ret;
} }
static int dvb_dvr_ioctl(struct inode *inode, struct file *file, static long dvb_dvr_ioctl(struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
return dvb_usercopy(inode, file, cmd, arg, dvb_dvr_do_ioctl); int ret;
lock_kernel();
ret = dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl);
unlock_kernel();
return ret;
} }
static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait) static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
...@@ -1208,7 +1221,7 @@ static const struct file_operations dvb_dvr_fops = { ...@@ -1208,7 +1221,7 @@ static const struct file_operations dvb_dvr_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_dvr_read, .read = dvb_dvr_read,
.write = dvb_dvr_write, .write = dvb_dvr_write,
.ioctl = dvb_dvr_ioctl, .unlocked_ioctl = dvb_dvr_ioctl,
.open = dvb_dvr_open, .open = dvb_dvr_open,
.release = dvb_dvr_release, .release = dvb_dvr_release,
.poll = dvb_dvr_poll, .poll = dvb_dvr_poll,
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include "dvb_ca_en50221.h" #include "dvb_ca_en50221.h"
...@@ -1181,7 +1182,7 @@ static int dvb_ca_en50221_thread(void *data) ...@@ -1181,7 +1182,7 @@ static int dvb_ca_en50221_thread(void *data)
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, static int dvb_ca_en50221_io_do_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1255,10 +1256,16 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, ...@@ -1255,10 +1256,16 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file,
* *
* @return 0 on success, <0 on error. * @return 0 on success, <0 on error.
*/ */
static int dvb_ca_en50221_io_ioctl(struct inode *inode, struct file *file, static long dvb_ca_en50221_io_ioctl(struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
return dvb_usercopy(inode, file, cmd, arg, dvb_ca_en50221_io_do_ioctl); int ret;
lock_kernel();
ret = dvb_usercopy(file, cmd, arg, dvb_ca_en50221_io_do_ioctl);
unlock_kernel();
return ret;
} }
...@@ -1611,7 +1618,7 @@ static const struct file_operations dvb_ca_fops = { ...@@ -1611,7 +1618,7 @@ static const struct file_operations dvb_ca_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_ca_en50221_io_read, .read = dvb_ca_en50221_io_read,
.write = dvb_ca_en50221_io_write, .write = dvb_ca_en50221_io_write,
.ioctl = dvb_ca_en50221_io_ioctl, .unlocked_ioctl = dvb_ca_en50221_io_ioctl,
.open = dvb_ca_en50221_io_open, .open = dvb_ca_en50221_io_open,
.release = dvb_ca_en50221_io_release, .release = dvb_ca_en50221_io_release,
.poll = dvb_ca_en50221_io_poll, .poll = dvb_ca_en50221_io_poll,
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/freezer.h> #include <linux/freezer.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/smp_lock.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -1188,14 +1189,14 @@ static void dtv_property_cache_submit(struct dvb_frontend *fe) ...@@ -1188,14 +1189,14 @@ static void dtv_property_cache_submit(struct dvb_frontend *fe)
} }
} }
static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, static int dvb_frontend_ioctl_legacy(struct file *file,
unsigned int cmd, void *parg); unsigned int cmd, void *parg);
static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, static int dvb_frontend_ioctl_properties(struct file *file,
unsigned int cmd, void *parg); unsigned int cmd, void *parg);
static int dtv_property_process_get(struct dvb_frontend *fe, static int dtv_property_process_get(struct dvb_frontend *fe,
struct dtv_property *tvp, struct dtv_property *tvp,
struct inode *inode, struct file *file) struct file *file)
{ {
int r = 0; int r = 0;
...@@ -1328,7 +1329,6 @@ static int dtv_property_process_get(struct dvb_frontend *fe, ...@@ -1328,7 +1329,6 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
static int dtv_property_process_set(struct dvb_frontend *fe, static int dtv_property_process_set(struct dvb_frontend *fe,
struct dtv_property *tvp, struct dtv_property *tvp,
struct inode *inode,
struct file *file) struct file *file)
{ {
int r = 0; int r = 0;
...@@ -1359,7 +1359,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1359,7 +1359,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
dprintk("%s() Finalised property cache\n", __func__); dprintk("%s() Finalised property cache\n", __func__);
dtv_property_cache_submit(fe); dtv_property_cache_submit(fe);
r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND, r |= dvb_frontend_ioctl_legacy(file, FE_SET_FRONTEND,
&fepriv->parameters); &fepriv->parameters);
break; break;
case DTV_FREQUENCY: case DTV_FREQUENCY:
...@@ -1391,12 +1391,12 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1391,12 +1391,12 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
break; break;
case DTV_VOLTAGE: case DTV_VOLTAGE:
fe->dtv_property_cache.voltage = tvp->u.data; fe->dtv_property_cache.voltage = tvp->u.data;
r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_VOLTAGE, r = dvb_frontend_ioctl_legacy(file, FE_SET_VOLTAGE,
(void *)fe->dtv_property_cache.voltage); (void *)fe->dtv_property_cache.voltage);
break; break;
case DTV_TONE: case DTV_TONE:
fe->dtv_property_cache.sectone = tvp->u.data; fe->dtv_property_cache.sectone = tvp->u.data;
r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE, r = dvb_frontend_ioctl_legacy(file, FE_SET_TONE,
(void *)fe->dtv_property_cache.sectone); (void *)fe->dtv_property_cache.sectone);
break; break;
case DTV_CODE_RATE_HP: case DTV_CODE_RATE_HP:
...@@ -1480,7 +1480,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1480,7 +1480,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
return r; return r;
} }
static int dvb_frontend_ioctl(struct inode *inode, struct file *file, static int dvb_frontend_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1502,17 +1502,17 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, ...@@ -1502,17 +1502,17 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
return -ERESTARTSYS; return -ERESTARTSYS;
if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
err = dvb_frontend_ioctl_properties(inode, file, cmd, parg); err = dvb_frontend_ioctl_properties(file, cmd, parg);
else { else {
fe->dtv_property_cache.state = DTV_UNDEFINED; fe->dtv_property_cache.state = DTV_UNDEFINED;
err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg); err = dvb_frontend_ioctl_legacy(file, cmd, parg);
} }
up(&fepriv->sem); up(&fepriv->sem);
return err; return err;
} }
static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, static int dvb_frontend_ioctl_properties(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1548,7 +1548,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1548,7 +1548,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
} }
for (i = 0; i < tvps->num; i++) { for (i = 0; i < tvps->num; i++) {
(tvp + i)->result = dtv_property_process_set(fe, tvp + i, inode, file); (tvp + i)->result = dtv_property_process_set(fe, tvp + i, file);
err |= (tvp + i)->result; err |= (tvp + i)->result;
} }
...@@ -1580,7 +1580,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1580,7 +1580,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
} }
for (i = 0; i < tvps->num; i++) { for (i = 0; i < tvps->num; i++) {
(tvp + i)->result = dtv_property_process_get(fe, tvp + i, inode, file); (tvp + i)->result = dtv_property_process_get(fe, tvp + i, file);
err |= (tvp + i)->result; err |= (tvp + i)->result;
} }
...@@ -1597,7 +1597,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1597,7 +1597,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
return err; return err;
} }
static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, static int dvb_frontend_ioctl_legacy(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -2022,7 +2022,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file) ...@@ -2022,7 +2022,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
static const struct file_operations dvb_frontend_fops = { static const struct file_operations dvb_frontend_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl, .unlocked_ioctl = dvb_generic_ioctl,
.poll = dvb_frontend_poll, .poll = dvb_frontend_poll,
.open = dvb_frontend_open, .open = dvb_frontend_open,
.release = dvb_frontend_release .release = dvb_frontend_release
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/dvb/net.h> #include <linux/dvb/net.h>
#include <linux/smp_lock.h>
#include <linux/uio.h> #include <linux/uio.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <linux/crc32.h> #include <linux/crc32.h>
...@@ -1333,7 +1334,7 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num) ...@@ -1333,7 +1334,7 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num)
return 0; return 0;
} }
static int dvb_net_do_ioctl(struct inode *inode, struct file *file, static int dvb_net_do_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1435,10 +1436,16 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, ...@@ -1435,10 +1436,16 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file,
return 0; return 0;
} }
static int dvb_net_ioctl(struct inode *inode, struct file *file, static long dvb_net_ioctl(struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
return dvb_usercopy(inode, file, cmd, arg, dvb_net_do_ioctl); int ret;
lock_kernel();
ret = dvb_usercopy(file, cmd, arg, dvb_net_do_ioctl);
unlock_kernel();
return ret;
} }
static int dvb_net_close(struct inode *inode, struct file *file) static int dvb_net_close(struct inode *inode, struct file *file)
...@@ -1459,7 +1466,7 @@ static int dvb_net_close(struct inode *inode, struct file *file) ...@@ -1459,7 +1466,7 @@ static int dvb_net_close(struct inode *inode, struct file *file)
static const struct file_operations dvb_net_fops = { static const struct file_operations dvb_net_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_net_ioctl, .unlocked_ioctl = dvb_net_ioctl,
.open = dvb_generic_open, .open = dvb_generic_open,
.release = dvb_net_close, .release = dvb_net_close,
}; };
......
...@@ -154,10 +154,11 @@ int dvb_generic_release(struct inode *inode, struct file *file) ...@@ -154,10 +154,11 @@ int dvb_generic_release(struct inode *inode, struct file *file)
EXPORT_SYMBOL(dvb_generic_release); EXPORT_SYMBOL(dvb_generic_release);
int dvb_generic_ioctl(struct inode *inode, struct file *file, long dvb_generic_ioctl(struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
int ret;
if (!dvbdev) if (!dvbdev)
return -ENODEV; return -ENODEV;
...@@ -165,7 +166,11 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file, ...@@ -165,7 +166,11 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file,
if (!dvbdev->kernel_ioctl) if (!dvbdev->kernel_ioctl)
return -EINVAL; return -EINVAL;
return dvb_usercopy (inode, file, cmd, arg, dvbdev->kernel_ioctl); lock_kernel();
ret = dvb_usercopy(file, cmd, arg, dvbdev->kernel_ioctl);
unlock_kernel();
return ret;
} }
EXPORT_SYMBOL(dvb_generic_ioctl); EXPORT_SYMBOL(dvb_generic_ioctl);
...@@ -377,9 +382,9 @@ EXPORT_SYMBOL(dvb_unregister_adapter); ...@@ -377,9 +382,9 @@ EXPORT_SYMBOL(dvb_unregister_adapter);
define this as video_usercopy(). this will introduce a dependecy define this as video_usercopy(). this will introduce a dependecy
to the v4l "videodev.o" module, which is unnecessary for some to the v4l "videodev.o" module, which is unnecessary for some
cards (ie. the budget dvb-cards don't need the v4l module...) */ cards (ie. the budget dvb-cards don't need the v4l module...) */
int dvb_usercopy(struct inode *inode, struct file *file, int dvb_usercopy(struct file *file,
unsigned int cmd, unsigned long arg, unsigned int cmd, unsigned long arg,
int (*func)(struct inode *inode, struct file *file, int (*func)(struct file *file,
unsigned int cmd, void *arg)) unsigned int cmd, void *arg))
{ {
char sbuf[128]; char sbuf[128];
...@@ -416,7 +421,7 @@ int dvb_usercopy(struct inode *inode, struct file *file, ...@@ -416,7 +421,7 @@ int dvb_usercopy(struct inode *inode, struct file *file,
} }
/* call driver */ /* call driver */
if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD) if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD)
err = -EINVAL; err = -EINVAL;
if (err < 0) if (err < 0)
......
...@@ -116,8 +116,7 @@ struct dvb_device { ...@@ -116,8 +116,7 @@ struct dvb_device {
wait_queue_head_t wait_queue; wait_queue_head_t wait_queue;
/* don't really need those !? -- FIXME: use video_usercopy */ /* don't really need those !? -- FIXME: use video_usercopy */
int (*kernel_ioctl)(struct inode *inode, struct file *file, int (*kernel_ioctl)(struct file *file, unsigned int cmd, void *arg);
unsigned int cmd, void *arg);
void *priv; void *priv;
}; };
...@@ -138,17 +137,15 @@ extern void dvb_unregister_device (struct dvb_device *dvbdev); ...@@ -138,17 +137,15 @@ extern void dvb_unregister_device (struct dvb_device *dvbdev);
extern int dvb_generic_open (struct inode *inode, struct file *file); extern int dvb_generic_open (struct inode *inode, struct file *file);
extern int dvb_generic_release (struct inode *inode, struct file *file); extern int dvb_generic_release (struct inode *inode, struct file *file);
extern int dvb_generic_ioctl (struct inode *inode, struct file *file, extern long dvb_generic_ioctl (struct file *file,
unsigned int cmd, unsigned long arg); unsigned int cmd, unsigned long arg);
/* we don't mess with video_usercopy() any more, /* we don't mess with video_usercopy() any more,
we simply define out own dvb_usercopy(), which will hopefully become we simply define out own dvb_usercopy(), which will hopefully become
generic_usercopy() someday... */ generic_usercopy() someday... */
extern int dvb_usercopy(struct inode *inode, struct file *file, extern int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int cmd, unsigned long arg, int (*func)(struct file *file, unsigned int cmd, void *arg));
int (*func)(struct inode *inode, struct file *file,
unsigned int cmd, void *arg));
/** generic DVB attach function. */ /** generic DVB attach function. */
#ifdef CONFIG_MEDIA_ATTACH #ifdef CONFIG_MEDIA_ATTACH
......
...@@ -175,8 +175,7 @@ static int fdtv_ca_send_msg(struct firedtv *fdtv, void *arg) ...@@ -175,8 +175,7 @@ static int fdtv_ca_send_msg(struct firedtv *fdtv, void *arg)
return err; return err;
} }
static int fdtv_ca_ioctl(struct inode *inode, struct file *file, static int fdtv_ca_ioctl(struct file *file, unsigned int cmd, void *arg)
unsigned int cmd, void *arg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct firedtv *fdtv = dvbdev->priv; struct firedtv *fdtv = dvbdev->priv;
...@@ -217,7 +216,7 @@ static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait) ...@@ -217,7 +216,7 @@ static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait)
static const struct file_operations fdtv_ca_fops = { static const struct file_operations fdtv_ca_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl, .unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_generic_open, .open = dvb_generic_open,
.release = dvb_generic_release, .release = dvb_generic_release,
.poll = fdtv_ca_io_poll, .poll = fdtv_ca_io_poll,
......
...@@ -708,7 +708,7 @@ static void gpioirq(unsigned long cookie) ...@@ -708,7 +708,7 @@ static void gpioirq(unsigned long cookie)
#ifdef CONFIG_DVB_AV7110_OSD #ifdef CONFIG_DVB_AV7110_OSD
static int dvb_osd_ioctl(struct inode *inode, struct file *file, static int dvb_osd_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -727,7 +727,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file, ...@@ -727,7 +727,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file,
static const struct file_operations dvb_osd_fops = { static const struct file_operations dvb_osd_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl, .unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_generic_open, .open = dvb_generic_open,
.release = dvb_generic_release, .release = dvb_generic_release,
}; };
......
...@@ -1089,7 +1089,7 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len ...@@ -1089,7 +1089,7 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len
} }
static int dvb_video_ioctl(struct inode *inode, struct file *file, static int dvb_video_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1297,7 +1297,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file, ...@@ -1297,7 +1297,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
return ret; return ret;
} }
static int dvb_audio_ioctl(struct inode *inode, struct file *file, static int dvb_audio_ioctl(struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -1517,7 +1517,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file) ...@@ -1517,7 +1517,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file)
static const struct file_operations dvb_video_fops = { static const struct file_operations dvb_video_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = dvb_video_write, .write = dvb_video_write,
.ioctl = dvb_generic_ioctl, .unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_video_open, .open = dvb_video_open,
.release = dvb_video_release, .release = dvb_video_release,
.poll = dvb_video_poll, .poll = dvb_video_poll,
...@@ -1535,7 +1535,7 @@ static struct dvb_device dvbdev_video = { ...@@ -1535,7 +1535,7 @@ static struct dvb_device dvbdev_video = {
static const struct file_operations dvb_audio_fops = { static const struct file_operations dvb_audio_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = dvb_audio_write, .write = dvb_audio_write,
.ioctl = dvb_generic_ioctl, .unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_audio_open, .open = dvb_audio_open,
.release = dvb_audio_release, .release = dvb_audio_release,
.poll = dvb_audio_poll, .poll = dvb_audio_poll,
......
...@@ -248,8 +248,7 @@ static unsigned int dvb_ca_poll (struct file *file, poll_table *wait) ...@@ -248,8 +248,7 @@ static unsigned int dvb_ca_poll (struct file *file, poll_table *wait)
return mask; return mask;
} }
static int dvb_ca_ioctl(struct inode *inode, struct file *file, static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg)
unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct av7110 *av7110 = dvbdev->priv; struct av7110 *av7110 = dvbdev->priv;
...@@ -350,7 +349,7 @@ static const struct file_operations dvb_ca_fops = { ...@@ -350,7 +349,7 @@ static const struct file_operations dvb_ca_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_ca_read, .read = dvb_ca_read,
.write = dvb_ca_write, .write = dvb_ca_write,
.ioctl = dvb_generic_ioctl, .unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_ca_open, .open = dvb_ca_open,
.release = dvb_generic_release, .release = dvb_generic_release,
.poll = dvb_ca_poll, .poll = dvb_ca_poll,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment