Removal of void * casts Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx> diff -puN drivers/media/dvb/ttpci/av7110_av.c~dvb-120 drivers/media/dvb/ttpci/av7110_av.c --- a/drivers/media/dvb/ttpci/av7110_av.c~dvb-120 2005-05-18 23:52:43.521169457 +0200 +++ b/drivers/media/dvb/ttpci/av7110_av.c 2005-05-18 23:52:43.593157770 +0200 @@ -96,7 +96,7 @@ static void p_to_t(u8 const *buf, long i int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) { - struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) p2t->priv; + struct dvb_demux_feed *dvbdmxfeed = p2t->priv; if (!(dvbdmxfeed->ts_type & TS_PACKET)) return 0; @@ -111,7 +111,7 @@ int av7110_record_cb(struct dvb_filter_p static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data) { - struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) priv; + struct dvb_demux_feed *dvbdmxfeed = priv; dvbdmxfeed->cb.ts(data, 188, NULL, 0, &dvbdmxfeed->feed.ts, DMX_OK); @@ -396,7 +396,8 @@ static inline long aux_ring_buffer_write static void play_video_cb(u8 *buf, int count, void *priv) { - struct av7110 *av7110 = (struct av7110 *) priv; + struct av7110 *av7110 = priv; + dprintk(2, "av7110:%p, \n", av7110); if ((buf[3] & 0xe0) == 0xe0) { @@ -408,7 +409,7 @@ static void play_video_cb(u8 *buf, int c static void play_audio_cb(u8 *buf, int count, void *priv) { - struct av7110 *av7110 = (struct av7110 *) priv; + struct av7110 *av7110 = priv; dprintk(2, "av7110:%p, \n", av7110); aux_ring_buffer_write(&av7110->aout, buf, count); @@ -760,7 +761,7 @@ static void p_to_t(u8 const *buf, long i int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len) { struct dvb_demux *demux = feed->demux; - struct av7110 *av7110 = (struct av7110 *) demux->priv; + struct av7110 *av7110 = demux->priv; struct ipack *ipack = &av7110->ipack[feed->pes_type]; dprintk(2, "av7110:%p, \n", av7110); @@ -860,8 +861,8 @@ static int dvb_video_get_event (struct a static unsigned int dvb_video_poll(struct file *file, poll_table *wait) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; unsigned int mask = 0; dprintk(2, "av7110:%p, \n", av7110); @@ -888,8 +889,8 @@ static unsigned int dvb_video_poll(struc static ssize_t dvb_video_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(2, "av7110:%p, \n", av7110); @@ -904,8 +905,8 @@ static ssize_t dvb_video_write(struct fi static unsigned int dvb_audio_poll(struct file *file, poll_table *wait) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; unsigned int mask = 0; dprintk(2, "av7110:%p, \n", av7110); @@ -924,8 +925,8 @@ static unsigned int dvb_audio_poll(struc static ssize_t dvb_audio_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(2, "av7110:%p, \n", av7110); @@ -969,8 +970,8 @@ static int play_iframe(struct av7110 *av static int dvb_video_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; unsigned long arg = (unsigned long) parg; int ret = 0; @@ -1093,8 +1094,8 @@ static int dvb_video_ioctl(struct inode case VIDEO_STILLPICTURE: { - struct video_still_picture *pic = - (struct video_still_picture *) parg; + struct video_still_picture *pic = parg; + av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY; dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); ret = play_iframe(av7110, pic->iFrame, pic->size, @@ -1165,8 +1166,8 @@ static int dvb_video_ioctl(struct inode static int dvb_audio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; unsigned long arg = (unsigned long) parg; int ret = 0; @@ -1272,7 +1273,7 @@ static int dvb_audio_ioctl(struct inode break; case AUDIO_SET_MIXER: { - struct audio_mixer *amix = (struct audio_mixer *)parg; + struct audio_mixer *amix = parg; av7110_set_volume(av7110, amix->volume_left, amix->volume_right); break; @@ -1288,8 +1289,8 @@ static int dvb_audio_ioctl(struct inode static int dvb_video_open(struct inode *inode, struct file *file) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; int err; dprintk(2, "av7110:%p, \n", av7110); @@ -1313,8 +1314,8 @@ static int dvb_video_open(struct inode * static int dvb_video_release(struct inode *inode, struct file *file) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(2, "av7110:%p, \n", av7110); @@ -1327,8 +1328,8 @@ static int dvb_video_release(struct inod static int dvb_audio_open(struct inode *inode, struct file *file) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; int err=dvb_generic_open(inode, file); dprintk(2, "av7110:%p, \n", av7110); @@ -1342,8 +1343,8 @@ static int dvb_audio_open(struct inode * static int dvb_audio_release(struct inode *inode, struct file *file) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(2, "av7110:%p, \n", av7110); diff -puN drivers/media/dvb/ttpci/av7110.c~dvb-120 drivers/media/dvb/ttpci/av7110.c --- a/drivers/media/dvb/ttpci/av7110.c~dvb-120 2005-05-18 23:52:43.539166535 +0200 +++ b/drivers/media/dvb/ttpci/av7110.c 2005-05-18 23:52:43.611154848 +0200 @@ -716,8 +716,8 @@ static void gpioirq(unsigned long data) static int dvb_osd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(4, "%p\n", av7110); @@ -800,7 +800,7 @@ void ChangePIDs(struct av7110 *av7110, u static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) { struct dvb_demux_feed *dvbdmxfeed = dvbdmxfilter->feed; - struct av7110 *av7110 = (struct av7110 *) dvbdmxfeed->demux->priv; + struct av7110 *av7110 = dvbdmxfeed->demux->priv; u16 buf[20]; int ret, i; u16 handle; @@ -847,7 +847,7 @@ static int StartHWFilter(struct dvb_demu static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) { - struct av7110 *av7110 = (struct av7110 *) dvbdmxfilter->feed->demux->priv; + struct av7110 *av7110 = dvbdmxfilter->feed->demux->priv; u16 buf[3]; u16 answ[2]; int ret; @@ -882,7 +882,7 @@ static int StopHWFilter(struct dvb_demux static void dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx = dvbdmxfeed->demux; - struct av7110 *av7110 = (struct av7110 *) dvbdmx->priv; + struct av7110 *av7110 = dvbdmx->priv; u16 *pid = dvbdmx->pids, npids[5]; int i; @@ -915,7 +915,7 @@ static void dvb_feed_start_pid(struct dv static void dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) { struct dvb_demux *dvbdmx = dvbdmxfeed->demux; - struct av7110 *av7110 = (struct av7110 *) dvbdmx->priv; + struct av7110 *av7110 = dvbdmx->priv; u16 *pid = dvbdmx->pids, npids[5]; int i; @@ -1115,7 +1115,7 @@ static int dvb_get_stc(struct dmx_demux static int av7110_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) { - struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + struct av7110* av7110 = fe->dvb->priv; switch (tone) { case SEC_TONE_ON: @@ -1183,7 +1183,7 @@ static int start_ts_capture(struct av711 static int budget_start_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; - struct av7110 *budget = (struct av7110 *) demux->priv; + struct av7110 *budget = demux->priv; int status; dprintk(2, "av7110: %p\n", budget); @@ -1198,7 +1198,7 @@ static int budget_start_feed(struct dvb_ static int budget_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; - struct av7110 *budget = (struct av7110 *) demux->priv; + struct av7110 *budget = demux->priv; int status; dprintk(2, "budget: %p\n", budget); @@ -1262,7 +1262,7 @@ static int av7110_register(struct av7110 av7110->registered = 1; - dvbdemux->priv = (void *) av7110; + dvbdemux->priv = av7110; for (i = 0; i < 32; i++) av7110->handle2filter[i] = NULL; @@ -1535,7 +1535,7 @@ static int get_firmware(struct av7110* a static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { - struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + struct av7110* av7110 = fe->dvb->priv; u8 pwr = 0; u8 buf[4]; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; @@ -1717,7 +1717,7 @@ static u8 alps_bsbe1_inittab[] = { static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { - struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + struct av7110* av7110 = fe->dvb->priv; int ret; u8 data[4]; u32 div; @@ -1750,7 +1750,7 @@ static struct stv0299_config alps_bsbe1_ static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) { - struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + struct av7110* av7110 = fe->dvb->priv; int ret; u8 data[1]; struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) }; @@ -1887,7 +1887,7 @@ static int alps_tdlb7_pll_set(struct dvb static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) { - struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + struct av7110* av7110 = fe->dvb->priv; return request_firmware(fw, name, &av7110->dev->pci->dev); } @@ -1956,7 +1956,7 @@ static struct stv0297_config nexusca_stv static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { - struct av7110* av7110 = (struct av7110*) fe->dvb->priv; + struct av7110* av7110 = fe->dvb->priv; u32 div; u8 cfg, cpump, band_select; u8 data[4]; diff -puN drivers/media/dvb/ttpci/av7110_ca.c~dvb-120 drivers/media/dvb/ttpci/av7110_ca.c --- a/drivers/media/dvb/ttpci/av7110_ca.c~dvb-120 2005-05-18 23:52:43.554164100 +0200 +++ b/drivers/media/dvb/ttpci/av7110_ca.c 2005-05-18 23:52:43.617153874 +0200 @@ -215,8 +215,8 @@ static ssize_t ci_ll_read(struct dvb_rin static int dvb_ca_open(struct inode *inode, struct file *file) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; int err = dvb_generic_open(inode, file); dprintk(8, "av7110:%p\n",av7110); @@ -229,8 +229,8 @@ static int dvb_ca_open(struct inode *ino static unsigned int dvb_ca_poll (struct file *file, poll_table *wait) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer; struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; unsigned int mask = 0; @@ -252,8 +252,8 @@ static unsigned int dvb_ca_poll (struct static int dvb_ca_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *parg) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; unsigned long arg = (unsigned long) parg; dprintk(8, "av7110:%p\n",av7110); @@ -306,7 +306,7 @@ static int dvb_ca_ioctl(struct inode *in case CA_SET_DESCR: { - ca_descr_t *descr = (ca_descr_t*) parg; + ca_descr_t *descr = parg; if (descr->index >= 16) return -EINVAL; @@ -330,8 +330,8 @@ static int dvb_ca_ioctl(struct inode *in static ssize_t dvb_ca_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(8, "av7110:%p\n",av7110); return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); @@ -340,8 +340,8 @@ static ssize_t dvb_ca_write(struct file static ssize_t dvb_ca_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; - struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; + struct dvb_device *dvbdev = file->private_data; + struct av7110 *av7110 = dvbdev->priv; dprintk(8, "av7110:%p\n",av7110); return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); diff -puN drivers/media/dvb/ttpci/av7110_v4l.c~dvb-120 drivers/media/dvb/ttpci/av7110_v4l.c --- a/drivers/media/dvb/ttpci/av7110_v4l.c~dvb-120 2005-05-18 23:52:43.570161503 +0200 +++ b/drivers/media/dvb/ttpci/av7110_v4l.c 2005-05-18 23:52:43.623152900 +0200 @@ -196,7 +196,7 @@ static int av7110_dvb_c_switch(struct sa { struct saa7146_dev *dev = fh->dev; struct saa7146_vv *vv = dev->vv_data; - struct av7110 *av7110 = (struct av7110*)dev->ext_priv; + struct av7110 *av7110 = dev->ext_priv; u16 adswitch; int source, sync, err; @@ -270,7 +270,7 @@ static int av7110_dvb_c_switch(struct sa static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) { struct saa7146_dev *dev = fh->dev; - struct av7110 *av7110 = (struct av7110*) dev->ext_priv; + struct av7110 *av7110 = dev->ext_priv; dprintk(4, "saa7146_dev: %p\n", dev); switch (cmd) { @@ -419,7 +419,7 @@ static int av7110_ioctl(struct saa7146_f } case VIDIOC_G_INPUT: { - int *input = (int *)arg; + int *input = arg; *input = av7110->current_input; dprintk(2, "VIDIOC_G_INPUT: %d\n", *input); return 0; _