diff options
-rw-r--r-- | linux/drivers/media/dvb/av7110/av7110.c | 40 | ||||
-rw-r--r-- | linux/drivers/media/dvb/av7110/av7110.h | 8 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dmxdev.c | 22 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dmxdev.h | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_ksyms.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvbdev.c | 95 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvbdev.h | 22 |
10 files changed, 68 insertions, 138 deletions
diff --git a/linux/drivers/media/dvb/av7110/av7110.c b/linux/drivers/media/dvb/av7110/av7110.c index a5a2193c4..17cc22251 100644 --- a/linux/drivers/media/dvb/av7110/av7110.c +++ b/linux/drivers/media/dvb/av7110/av7110.c @@ -3118,7 +3118,7 @@ static int dvb_mmap(struct file* file, struct vm_area_struct *vma) static unsigned int dvb_audio_poll(struct file *file, poll_table *wait) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; unsigned int mask=0; @@ -3675,7 +3675,7 @@ ci_ll_read(ring_buffer_t *cibuf, struct file *file, char *buf, size_t count, lof static int dvb_ca_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; int err=dvb_generic_open(inode, file); @@ -3688,7 +3688,7 @@ dvb_ca_open(struct inode *inode, struct file *file) static unsigned int dvb_ca_poll(struct file *file, poll_table *wait) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; unsigned int mask=0; @@ -3717,7 +3717,7 @@ static int dvb_ca_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; unsigned long arg=(unsigned long) parg; @@ -3803,7 +3803,7 @@ static ssize_t dvb_ca_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); @@ -3812,7 +3812,7 @@ dvb_ca_write(struct file *file, const char *buf, static ssize_t dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); @@ -3827,7 +3827,7 @@ dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos) static unsigned int dvb_video_poll(struct file *file, poll_table *wait) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; unsigned int mask=0; @@ -3849,7 +3849,7 @@ static ssize_t dvb_video_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; if (av7110->videostate.stream_source!=VIDEO_SOURCE_MEMORY) @@ -3862,7 +3862,7 @@ static ssize_t dvb_audio_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; if (av7110->audiostate.stream_source!=AUDIO_SOURCE_MEMORY) { @@ -3899,7 +3899,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; unsigned long arg=(unsigned long) parg; int ret=0; @@ -4088,7 +4088,7 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; unsigned long arg=(unsigned long) parg; int ret=0; @@ -4207,7 +4207,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; #ifdef CONFIG_DVB_AV7110_OSD @@ -4219,7 +4219,7 @@ dvb_osd_ioctl(struct inode *inode, struct file *file, static int dvb_video_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; int err; @@ -4235,7 +4235,7 @@ static int dvb_video_open(struct inode *inode, struct file *file) static int dvb_video_release(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; AV_Stop(av7110, RP_VIDEO); @@ -4244,7 +4244,7 @@ static int dvb_video_release(struct inode *inode, struct file *file) static int dvb_audio_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; int err=dvb_generic_open(inode, file); @@ -4257,7 +4257,7 @@ static int dvb_audio_open(struct inode *inode, struct file *file) static int dvb_audio_release(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; av7110_t *av7110=(av7110_t *) dvbdev->priv; AV_Stop(av7110, RP_AUDIO); @@ -4279,7 +4279,7 @@ static struct file_operations dvb_video_fops = { .poll = dvb_video_poll, }; -static dvb_device_t dvbdev_video = { +static struct dvb_device dvbdev_video = { .priv = 0, .users = 1, .writers = 1, @@ -4296,7 +4296,7 @@ static struct file_operations dvb_audio_fops = { .poll = dvb_audio_poll, }; -static dvb_device_t dvbdev_audio = { +static struct dvb_device dvbdev_audio = { .priv = 0, .users = 1, .writers = 1, @@ -4314,7 +4314,7 @@ static struct file_operations dvb_ca_fops = { .poll = dvb_ca_poll, }; -static dvb_device_t dvbdev_ca = { +static struct dvb_device dvbdev_ca = { .priv = 0, .users = 1, .writers = 1, @@ -4329,7 +4329,7 @@ static struct file_operations dvb_osd_fops = { .release = dvb_generic_release, }; -static dvb_device_t dvbdev_osd = { +static struct dvb_device dvbdev_osd = { .priv = 0, .users = 1, .writers = 1, diff --git a/linux/drivers/media/dvb/av7110/av7110.h b/linux/drivers/media/dvb/av7110/av7110.h index 1337fad21..4d378c284 100644 --- a/linux/drivers/media/dvb/av7110/av7110.h +++ b/linux/drivers/media/dvb/av7110/av7110.h @@ -622,10 +622,10 @@ typedef struct av7110_s { dvb_adapter_t *dvb_adapter; - dvb_device_t *video_dev; - dvb_device_t *audio_dev; - dvb_device_t *ca_dev; - dvb_device_t *osd_dev; + struct dvb_device *video_dev; + struct dvb_device *audio_dev; + struct dvb_device *ca_dev; + struct dvb_device *osd_dev; int dsp_dev; } av7110_t; diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index 3081b1925..c2fca219b 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -181,7 +181,7 @@ dvb_dmxdev_dvr_state_set(dmxdev_dvr_t *dmxdevdvr, int state) static int dvb_dvr_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; dmx_frontend_t *front; @@ -230,7 +230,7 @@ static int dvb_dvr_open(struct inode *inode, struct file *file) static int dvb_dvr_release(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; if (down_interruptible (&dmxdev->mutex)) @@ -258,7 +258,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file) static ssize_t dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; int ret; @@ -276,7 +276,7 @@ dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos) static ssize_t dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; int ret; @@ -694,7 +694,7 @@ dvb_dmxdev_filter_start(dmxdev_filter_t *dmxdevfilter) static int dvb_demux_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; int i; dmxdev_filter_t *dmxdevfilter; @@ -919,7 +919,7 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, static int dvb_demux_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - return generic_usercopy(inode, file, cmd, arg, dvb_demux_do_ioctl); + return video_usercopy(inode, file, cmd, arg, dvb_demux_do_ioctl); } @@ -973,7 +973,7 @@ static struct file_operations dvb_demux_fops = { .poll = dvb_demux_poll, }; -static dvb_device_t dvbdev_demux = { +static struct dvb_device dvbdev_demux = { .priv = 0, .users = 1, .writers = 1, @@ -983,7 +983,7 @@ static dvb_device_t dvbdev_demux = { static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; int ret=0; @@ -1007,13 +1007,13 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, static int dvb_dvr_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - return generic_usercopy(inode, file, cmd, arg, dvb_dvr_do_ioctl); + return video_usercopy(inode, file, cmd, arg, dvb_dvr_do_ioctl); } static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv; dprintk ("function : %s\n", __FUNCTION__); @@ -1048,7 +1048,7 @@ static struct file_operations dvb_dvr_fops = { .poll =dvb_dvr_poll, }; -static dvb_device_t dvbdev_dvr = { +static struct dvb_device dvbdev_dvr = { .priv = 0, .users = 1, .writers = 1, diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.h b/linux/drivers/media/dvb/dvb-core/dmxdev.h index 2ce28656e..026147e3f 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.h +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.h @@ -64,7 +64,7 @@ typedef struct dmxdev_buffer_s { typedef struct dmxdev_filter_s { - dvb_device_t *dvbdev; + struct dvb_device *dvbdev; union { dmx_section_filter_t *sec; @@ -102,8 +102,8 @@ typedef struct dmxdev_dvr_s { typedef struct dmxdev_s { - dvb_device_t *dvbdev; - dvb_device_t *dvr_dvbdev; + struct dvb_device *dvbdev; + struct dvb_device *dvr_dvbdev; dmxdev_filter_t *filter; dmxdev_dvr_t *dvr; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index 7e14f56d9..0890f16bf 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -627,7 +627,7 @@ unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wai static int dvb_frontend_open (struct inode *inode, struct file *file) { - dvb_device_t *dvbdev = file->private_data; + struct dvb_device *dvbdev = file->private_data; struct dvb_frontend_data *fe = dvbdev->priv; int ret; @@ -648,7 +648,7 @@ int dvb_frontend_open (struct inode *inode, struct file *file) static int dvb_frontend_release (struct inode *inode, struct file *file) { - dvb_device_t *dvbdev = file->private_data; + struct dvb_device *dvbdev = file->private_data; struct dvb_frontend_data *fe = dvbdev->priv; dprintk ("%s\n", __FUNCTION__); @@ -845,7 +845,7 @@ dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend, { struct list_head *entry; struct dvb_frontend_data *fe; - dvb_device_t dvbdev_template = { users: 1, writers: 1, + struct dvb_device dvbdev_template = { users: 1, writers: 1, fops: &dvb_frontend_fops, kernel_ioctl: dvb_frontend_ioctl }; diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c b/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c index a4afdd50c..c715afbac 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ksyms.c @@ -37,7 +37,6 @@ EXPORT_SYMBOL(dvb_unregister_device); EXPORT_SYMBOL(dvb_generic_ioctl); EXPORT_SYMBOL(dvb_generic_open); EXPORT_SYMBOL(dvb_generic_release); -EXPORT_SYMBOL(generic_usercopy); EXPORT_SYMBOL(dvb_filter_ipack_init); EXPORT_SYMBOL(dvb_filter_ipack_reset); diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 35a18d3ae..60aa152f2 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -435,7 +435,7 @@ dvb_net_remove_if(dvb_net_t *dvbnet, int num) int dvb_net_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - dvb_device_t *dvbdev=(dvb_device_t *) file->private_data; + struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; dvb_net_t *dvbnet=(dvb_net_t *) dvbdev->priv; if (((file->f_flags&O_ACCMODE)==O_RDONLY)) @@ -468,7 +468,7 @@ static struct file_operations dvb_net_fops = { .release = dvb_generic_release, }; -static dvb_device_t dvbdev_net = { +static struct dvb_device dvbdev_net = { .priv = 0, .users = 1, .writers = 1, diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.h b/linux/drivers/media/dvb/dvb-core/dvb_net.h index 714c09565..71ab9f297 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.h +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.h @@ -47,7 +47,7 @@ typedef struct dvb_net_priv_s { } dvb_net_priv_t; typedef struct dvb_net_s { - dvb_device_t *dvbdev; + struct dvb_device *dvbdev; int card_num; int dev_num; diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index a8c7591c7..4a2be16c5 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -69,7 +69,7 @@ static char *dnames[] = { static -dvb_device_t* dvbdev_find_device (int minor) +struct dvb_device* dvbdev_find_device (int minor) { struct list_head *entry; @@ -78,8 +78,8 @@ dvb_device_t* dvbdev_find_device (int minor) dvb_adapter_t *adap; adap = list_entry (entry, dvb_adapter_t, list_head); list_for_each (entry0, &adap->device_list) { - dvb_device_t *dev; - dev = list_entry (entry0, dvb_device_t, list_head); + struct dvb_device *dev; + dev = list_entry (entry0, struct dvb_device, list_head); if (nums2minor(adap->num, dev->type, dev->id) == minor) return dev; } @@ -92,7 +92,7 @@ dvb_device_t* dvbdev_find_device (int minor) static int dvb_device_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev; + struct dvb_device *dvbdev; dvbdev = dvbdev_find_device (minor(inode->i_rdev)); @@ -127,7 +127,7 @@ static struct file_operations dvb_device_fops = int dvb_generic_open(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev = file->private_data; + struct dvb_device *dvbdev = file->private_data; if (!dvbdev) return -ENODEV; @@ -148,7 +148,7 @@ int dvb_generic_open(struct inode *inode, struct file *file) int dvb_generic_release(struct inode *inode, struct file *file) { - dvb_device_t *dvbdev = file->private_data; + struct dvb_device *dvbdev = file->private_data; if (!dvbdev) return -ENODEV; @@ -161,73 +161,10 @@ int dvb_generic_release(struct inode *inode, struct file *file) } -/* - * helper function -- handles userspace copying for ioctl arguments - */ -int -generic_usercopy(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, - int (*func)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg)) -{ - char sbuf[128]; - void *mbuf = NULL; - void *parg = NULL; - int err = -EINVAL; - - /* Copy arguments into temp kernel buffer */ - switch (_IOC_DIR(cmd)) { - case _IOC_NONE: - parg = (void *)arg; - break; - case _IOC_READ: /* some v4l ioctls are marked wrong ... */ - case _IOC_WRITE: - case (_IOC_WRITE | _IOC_READ): - if (_IOC_SIZE(cmd) <= sizeof(sbuf)) { - parg = sbuf; - } else { - /* too big to allocate from stack */ - mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL); - if (NULL == mbuf) - return -ENOMEM; - parg = mbuf; - } - - err = -EFAULT; - if (copy_from_user(parg, (void *)arg, _IOC_SIZE(cmd))) - goto out; - break; - } - - /* call driver */ - if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD) - err = -EINVAL; - - if (err < 0) - goto out; - - /* Copy results into user buffer */ - switch (_IOC_DIR(cmd)) - { - case _IOC_READ: - case (_IOC_WRITE | _IOC_READ): - if (copy_to_user((void *)arg, parg, _IOC_SIZE(cmd))) - err = -EFAULT; - break; - } - -out: - if (mbuf) - kfree(mbuf); - - return err; -} - - int dvb_generic_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - dvb_device_t *dvbdev = file->private_data; + struct dvb_device *dvbdev = file->private_data; if (!dvbdev) return -ENODEV; @@ -235,7 +172,7 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file, if (!dvbdev->kernel_ioctl) return -EINVAL; - return generic_usercopy (inode, file, cmd, arg, dvbdev->kernel_ioctl); + return video_usercopy (inode, file, cmd, arg, dvbdev->kernel_ioctl); } @@ -247,8 +184,8 @@ int dvbdev_get_free_id (struct dvb_adapter_s *adap, int type) while (id < DVB_MAX_IDS) { struct list_head *entry; list_for_each (entry, &adap->device_list) { - dvb_device_t *dev; - dev = list_entry (entry, dvb_device_t, list_head); + struct dvb_device *dev; + dev = list_entry (entry, struct dvb_device, list_head); if (dev->type == type && dev->id == id) goto skip; } @@ -260,12 +197,12 @@ skip: } -int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, - dvb_device_t *template, void *priv, int type) +int dvb_register_device(dvb_adapter_t *adap, struct dvb_device **pdvbdev, + struct dvb_device *template, void *priv, int type) { u32 id; char name [20]; - dvb_device_t *dvbdev; + struct dvb_device *dvbdev; if (down_interruptible (&dvbdev_register_lock)) return -ERESTARTSYS; @@ -277,7 +214,7 @@ int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, return -ENFILE; } - *pdvbdev = dvbdev = kmalloc(sizeof(dvb_device_t), GFP_KERNEL); + *pdvbdev = dvbdev = kmalloc(sizeof(struct dvb_device), GFP_KERNEL); if (!dvbdev) { up(&dvbdev_register_lock); @@ -286,7 +223,7 @@ int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, up (&dvbdev_register_lock); - memcpy(dvbdev, template, sizeof(dvb_device_t)); + memcpy(dvbdev, template, sizeof(struct dvb_device)); dvbdev->type = type; dvbdev->id = id; dvbdev->adapter = adap; @@ -310,7 +247,7 @@ int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, } -void dvb_unregister_device(dvb_device_t *dvbdev) +void dvb_unregister_device(struct dvb_device *dvbdev) { if (!dvbdev) return; diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.h b/linux/drivers/media/dvb/dvb-core/dvbdev.h index 52b0f0d09..90cbdf5f0 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.h +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.h @@ -43,8 +43,7 @@ #define DVB_DEVICE_OSD 8 -typedef struct dvb_adapter_s -{ +typedef struct dvb_adapter_s { int num; devfs_handle_t devfs_handle; struct list_head list_head; @@ -52,8 +51,7 @@ typedef struct dvb_adapter_s } dvb_adapter_t; -typedef struct dvb_device -{ +struct dvb_device { struct list_head list_head; struct file_operations *fops; devfs_handle_t devfs_handle; @@ -64,16 +62,16 @@ typedef struct dvb_device int users; int writers; - /* don't really need those !? */ - int (*kernel_ioctl)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg); // FIXME: use generic_usercopy() + /* don't really need those !? -- FIXME: use video_usercopy */ + int (*kernel_ioctl)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg); void *priv; -} dvb_device_t; +}; -int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, - dvb_device_t *template, void *priv, int type); +int dvb_register_device(dvb_adapter_t *adap, struct dvb_device **pdvbdev, + struct dvb_device *template, void *priv, int type); void dvb_unregister_device(struct dvb_device *dvbdev); int dvb_register_adapter(dvb_adapter_t **padap, char *name); @@ -83,9 +81,5 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); int dvb_generic_open(struct inode *inode, struct file *file); int dvb_generic_release(struct inode *inode, struct file *file); -int generic_usercopy(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, - int (*func)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg)); #endif /* #ifndef __DVBDEV_H */ |