aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2006-12-26 05:33:48 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:34:15 -0500
commitd9bdf77296a00538faff95f29bf238857daea2e7 (patch)
tree8cb8d7a0926b91419bac922ec65f619d3d13a066
parent9d85d776cb6ccc28ac5294a9ac4f6831295f489b (diff)
V4L/DVB (5011): DVB: Remove unneeded void * casts in ttpci/av7110
The patch removes unneeded void * casts for the following (void *) pointers: - struct file: private_data - struct dvb_device: priv - struct dvb_demux: priv - struct dvb_adapter: priv The patch also contains some whitespace and coding style cleanups in the relevant areas. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/ttpci/av7110.c28
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c42
-rw-r--r--drivers/media/dvb/ttpci/av7110_ca.c22
3 files changed, 45 insertions, 47 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 366c1371ee97..bb213d836c90 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -695,8 +695,8 @@ static void gpioirq(unsigned long data)
695static int dvb_osd_ioctl(struct inode *inode, struct file *file, 695static int dvb_osd_ioctl(struct inode *inode, struct file *file,
696 unsigned int cmd, void *parg) 696 unsigned int cmd, void *parg)
697{ 697{
698 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 698 struct dvb_device *dvbdev = file->private_data;
699 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 699 struct av7110 *av7110 = dvbdev->priv;
700 700
701 dprintk(4, "%p\n", av7110); 701 dprintk(4, "%p\n", av7110);
702 702
@@ -786,7 +786,7 @@ int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
786static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) 786static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter)
787{ 787{
788 struct dvb_demux_feed *dvbdmxfeed = dvbdmxfilter->feed; 788 struct dvb_demux_feed *dvbdmxfeed = dvbdmxfilter->feed;
789 struct av7110 *av7110 = (struct av7110 *) dvbdmxfeed->demux->priv; 789 struct av7110 *av7110 = dvbdmxfeed->demux->priv;
790 u16 buf[20]; 790 u16 buf[20];
791 int ret, i; 791 int ret, i;
792 u16 handle; 792 u16 handle;
@@ -835,7 +835,7 @@ static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter)
835 835
836static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) 836static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter)
837{ 837{
838 struct av7110 *av7110 = (struct av7110 *) dvbdmxfilter->feed->demux->priv; 838 struct av7110 *av7110 = dvbdmxfilter->feed->demux->priv;
839 u16 buf[3]; 839 u16 buf[3];
840 u16 answ[2]; 840 u16 answ[2];
841 int ret; 841 int ret;
@@ -871,7 +871,7 @@ static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter)
871static int dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) 871static int dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed)
872{ 872{
873 struct dvb_demux *dvbdmx = dvbdmxfeed->demux; 873 struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
874 struct av7110 *av7110 = (struct av7110 *) dvbdmx->priv; 874 struct av7110 *av7110 = dvbdmx->priv;
875 u16 *pid = dvbdmx->pids, npids[5]; 875 u16 *pid = dvbdmx->pids, npids[5];
876 int i; 876 int i;
877 int ret = 0; 877 int ret = 0;
@@ -914,7 +914,7 @@ static int dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed)
914static int dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) 914static int dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed)
915{ 915{
916 struct dvb_demux *dvbdmx = dvbdmxfeed->demux; 916 struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
917 struct av7110 *av7110 = (struct av7110 *) dvbdmx->priv; 917 struct av7110 *av7110 = dvbdmx->priv;
918 u16 *pid = dvbdmx->pids, npids[5]; 918 u16 *pid = dvbdmx->pids, npids[5];
919 int i; 919 int i;
920 920
@@ -1103,9 +1103,9 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num,
1103 1103
1104 /* pointer casting paranoia... */ 1104 /* pointer casting paranoia... */
1105 BUG_ON(!demux); 1105 BUG_ON(!demux);
1106 dvbdemux = (struct dvb_demux *) demux->priv; 1106 dvbdemux = demux->priv;
1107 BUG_ON(!dvbdemux); 1107 BUG_ON(!dvbdemux);
1108 av7110 = (struct av7110 *) dvbdemux->priv; 1108 av7110 = dvbdemux->priv;
1109 1109
1110 dprintk(4, "%p\n", av7110); 1110 dprintk(4, "%p\n", av7110);
1111 1111
@@ -1137,7 +1137,7 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num,
1137 1137
1138static int av7110_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) 1138static int av7110_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
1139{ 1139{
1140 struct av7110* av7110 = (struct av7110*) fe->dvb->priv; 1140 struct av7110* av7110 = fe->dvb->priv;
1141 1141
1142 switch (tone) { 1142 switch (tone) {
1143 case SEC_TONE_ON: 1143 case SEC_TONE_ON:
@@ -1197,7 +1197,7 @@ static int start_ts_capture(struct av7110 *budget)
1197static int budget_start_feed(struct dvb_demux_feed *feed) 1197static int budget_start_feed(struct dvb_demux_feed *feed)
1198{ 1198{
1199 struct dvb_demux *demux = feed->demux; 1199 struct dvb_demux *demux = feed->demux;
1200 struct av7110 *budget = (struct av7110 *) demux->priv; 1200 struct av7110 *budget = demux->priv;
1201 int status; 1201 int status;
1202 1202
1203 dprintk(2, "av7110: %p\n", budget); 1203 dprintk(2, "av7110: %p\n", budget);
@@ -1212,7 +1212,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed)
1212static int budget_stop_feed(struct dvb_demux_feed *feed) 1212static int budget_stop_feed(struct dvb_demux_feed *feed)
1213{ 1213{
1214 struct dvb_demux *demux = feed->demux; 1214 struct dvb_demux *demux = feed->demux;
1215 struct av7110 *budget = (struct av7110 *) demux->priv; 1215 struct av7110 *budget = demux->priv;
1216 int status; 1216 int status;
1217 1217
1218 dprintk(2, "budget: %p\n", budget); 1218 dprintk(2, "budget: %p\n", budget);
@@ -1551,7 +1551,7 @@ static int get_firmware(struct av7110* av7110)
1551 1551
1552static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) 1552static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1553{ 1553{
1554 struct av7110* av7110 = (struct av7110*) fe->dvb->priv; 1554 struct av7110* av7110 = fe->dvb->priv;
1555 u8 pwr = 0; 1555 u8 pwr = 0;
1556 u8 buf[4]; 1556 u8 buf[4];
1557 struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; 1557 struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) };
@@ -1702,7 +1702,7 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1702static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) 1702static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name)
1703{ 1703{
1704#if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) 1704#if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE)
1705 struct av7110* av7110 = (struct av7110*) fe->dvb->priv; 1705 struct av7110* av7110 = fe->dvb->priv;
1706 1706
1707 return request_firmware(fw, name, &av7110->dev->pci->dev); 1707 return request_firmware(fw, name, &av7110->dev->pci->dev);
1708#else 1708#else
@@ -1867,7 +1867,7 @@ static struct stv0297_config nexusca_stv0297_config = {
1867 1867
1868static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) 1868static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1869{ 1869{
1870 struct av7110* av7110 = (struct av7110*) fe->dvb->priv; 1870 struct av7110* av7110 = fe->dvb->priv;
1871 u32 div; 1871 u32 div;
1872 u8 cfg, cpump, band_select; 1872 u8 cfg, cpump, band_select;
1873 u8 data[4]; 1873 u8 data[4];
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index 795e6e95915c..e719af807685 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -880,8 +880,8 @@ static int dvb_video_get_event (struct av7110 *av7110, struct video_event *event
880 880
881static unsigned int dvb_video_poll(struct file *file, poll_table *wait) 881static unsigned int dvb_video_poll(struct file *file, poll_table *wait)
882{ 882{
883 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 883 struct dvb_device *dvbdev = file->private_data;
884 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 884 struct av7110 *av7110 = dvbdev->priv;
885 unsigned int mask = 0; 885 unsigned int mask = 0;
886 886
887 dprintk(2, "av7110:%p, \n", av7110); 887 dprintk(2, "av7110:%p, \n", av7110);
@@ -908,8 +908,8 @@ static unsigned int dvb_video_poll(struct file *file, poll_table *wait)
908static ssize_t dvb_video_write(struct file *file, const char __user *buf, 908static ssize_t dvb_video_write(struct file *file, const char __user *buf,
909 size_t count, loff_t *ppos) 909 size_t count, loff_t *ppos)
910{ 910{
911 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 911 struct dvb_device *dvbdev = file->private_data;
912 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 912 struct av7110 *av7110 = dvbdev->priv;
913 913
914 dprintk(2, "av7110:%p, \n", av7110); 914 dprintk(2, "av7110:%p, \n", av7110);
915 915
@@ -924,8 +924,8 @@ static ssize_t dvb_video_write(struct file *file, const char __user *buf,
924 924
925static unsigned int dvb_audio_poll(struct file *file, poll_table *wait) 925static unsigned int dvb_audio_poll(struct file *file, poll_table *wait)
926{ 926{
927 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 927 struct dvb_device *dvbdev = file->private_data;
928 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 928 struct av7110 *av7110 = dvbdev->priv;
929 unsigned int mask = 0; 929 unsigned int mask = 0;
930 930
931 dprintk(2, "av7110:%p, \n", av7110); 931 dprintk(2, "av7110:%p, \n", av7110);
@@ -944,8 +944,8 @@ static unsigned int dvb_audio_poll(struct file *file, poll_table *wait)
944static ssize_t dvb_audio_write(struct file *file, const char __user *buf, 944static ssize_t dvb_audio_write(struct file *file, const char __user *buf,
945 size_t count, loff_t *ppos) 945 size_t count, loff_t *ppos)
946{ 946{
947 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 947 struct dvb_device *dvbdev = file->private_data;
948 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 948 struct av7110 *av7110 = dvbdev->priv;
949 949
950 dprintk(2, "av7110:%p, \n", av7110); 950 dprintk(2, "av7110:%p, \n", av7110);
951 951
@@ -989,8 +989,8 @@ static int play_iframe(struct av7110 *av7110, u8 __user *buf, unsigned int len,
989static int dvb_video_ioctl(struct inode *inode, struct file *file, 989static int dvb_video_ioctl(struct inode *inode, struct file *file,
990 unsigned int cmd, void *parg) 990 unsigned int cmd, void *parg)
991{ 991{
992 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 992 struct dvb_device *dvbdev = file->private_data;
993 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 993 struct av7110 *av7110 = dvbdev->priv;
994 unsigned long arg = (unsigned long) parg; 994 unsigned long arg = (unsigned long) parg;
995 int ret = 0; 995 int ret = 0;
996 996
@@ -1203,8 +1203,8 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
1203static int dvb_audio_ioctl(struct inode *inode, struct file *file, 1203static int dvb_audio_ioctl(struct inode *inode, struct file *file,
1204 unsigned int cmd, void *parg) 1204 unsigned int cmd, void *parg)
1205{ 1205{
1206 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 1206 struct dvb_device *dvbdev = file->private_data;
1207 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 1207 struct av7110 *av7110 = dvbdev->priv;
1208 unsigned long arg = (unsigned long) parg; 1208 unsigned long arg = (unsigned long) parg;
1209 int ret = 0; 1209 int ret = 0;
1210 1210
@@ -1349,8 +1349,8 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file,
1349 1349
1350static int dvb_video_open(struct inode *inode, struct file *file) 1350static int dvb_video_open(struct inode *inode, struct file *file)
1351{ 1351{
1352 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 1352 struct dvb_device *dvbdev = file->private_data;
1353 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 1353 struct av7110 *av7110 = dvbdev->priv;
1354 int err; 1354 int err;
1355 1355
1356 dprintk(2, "av7110:%p, \n", av7110); 1356 dprintk(2, "av7110:%p, \n", av7110);
@@ -1374,8 +1374,8 @@ static int dvb_video_open(struct inode *inode, struct file *file)
1374 1374
1375static int dvb_video_release(struct inode *inode, struct file *file) 1375static int dvb_video_release(struct inode *inode, struct file *file)
1376{ 1376{
1377 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 1377 struct dvb_device *dvbdev = file->private_data;
1378 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 1378 struct av7110 *av7110 = dvbdev->priv;
1379 1379
1380 dprintk(2, "av7110:%p, \n", av7110); 1380 dprintk(2, "av7110:%p, \n", av7110);
1381 1381
@@ -1388,9 +1388,9 @@ static int dvb_video_release(struct inode *inode, struct file *file)
1388 1388
1389static int dvb_audio_open(struct inode *inode, struct file *file) 1389static int dvb_audio_open(struct inode *inode, struct file *file)
1390{ 1390{
1391 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 1391 struct dvb_device *dvbdev = file->private_data;
1392 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 1392 struct av7110 *av7110 = dvbdev->priv;
1393 int err=dvb_generic_open(inode, file); 1393 int err = dvb_generic_open(inode, file);
1394 1394
1395 dprintk(2, "av7110:%p, \n", av7110); 1395 dprintk(2, "av7110:%p, \n", av7110);
1396 1396
@@ -1403,8 +1403,8 @@ static int dvb_audio_open(struct inode *inode, struct file *file)
1403 1403
1404static int dvb_audio_release(struct inode *inode, struct file *file) 1404static int dvb_audio_release(struct inode *inode, struct file *file)
1405{ 1405{
1406 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 1406 struct dvb_device *dvbdev = file->private_data;
1407 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 1407 struct av7110 *av7110 = dvbdev->priv;
1408 1408
1409 dprintk(2, "av7110:%p, \n", av7110); 1409 dprintk(2, "av7110:%p, \n", av7110);
1410 1410
diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c
index 4251a97d420e..e9b4e88e7932 100644
--- a/drivers/media/dvb/ttpci/av7110_ca.c
+++ b/drivers/media/dvb/ttpci/av7110_ca.c
@@ -214,8 +214,8 @@ static ssize_t ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file,
214 214
215static int dvb_ca_open(struct inode *inode, struct file *file) 215static int dvb_ca_open(struct inode *inode, struct file *file)
216{ 216{
217 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 217 struct dvb_device *dvbdev = file->private_data;
218 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 218 struct av7110 *av7110 = dvbdev->priv;
219 int err = dvb_generic_open(inode, file); 219 int err = dvb_generic_open(inode, file);
220 220
221 dprintk(8, "av7110:%p\n",av7110); 221 dprintk(8, "av7110:%p\n",av7110);
@@ -228,8 +228,8 @@ static int dvb_ca_open(struct inode *inode, struct file *file)
228 228
229static unsigned int dvb_ca_poll (struct file *file, poll_table *wait) 229static unsigned int dvb_ca_poll (struct file *file, poll_table *wait)
230{ 230{
231 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 231 struct dvb_device *dvbdev = file->private_data;
232 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 232 struct av7110 *av7110 = dvbdev->priv;
233 struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer; 233 struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer;
234 struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; 234 struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer;
235 unsigned int mask = 0; 235 unsigned int mask = 0;
@@ -251,8 +251,8 @@ static unsigned int dvb_ca_poll (struct file *file, poll_table *wait)
251static int dvb_ca_ioctl(struct inode *inode, struct file *file, 251static int dvb_ca_ioctl(struct inode *inode, struct file *file,
252 unsigned int cmd, void *parg) 252 unsigned int cmd, void *parg)
253{ 253{
254 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 254 struct dvb_device *dvbdev = file->private_data;
255 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 255 struct av7110 *av7110 = dvbdev->priv;
256 unsigned long arg = (unsigned long) parg; 256 unsigned long arg = (unsigned long) parg;
257 257
258 dprintk(8, "av7110:%p\n",av7110); 258 dprintk(8, "av7110:%p\n",av7110);
@@ -329,8 +329,8 @@ static int dvb_ca_ioctl(struct inode *inode, struct file *file,
329static ssize_t dvb_ca_write(struct file *file, const char __user *buf, 329static ssize_t dvb_ca_write(struct file *file, const char __user *buf,
330 size_t count, loff_t *ppos) 330 size_t count, loff_t *ppos)
331{ 331{
332 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 332 struct dvb_device *dvbdev = file->private_data;
333 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 333 struct av7110 *av7110 = dvbdev->priv;
334 334
335 dprintk(8, "av7110:%p\n",av7110); 335 dprintk(8, "av7110:%p\n",av7110);
336 return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); 336 return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos);
@@ -339,15 +339,13 @@ static ssize_t dvb_ca_write(struct file *file, const char __user *buf,
339static ssize_t dvb_ca_read(struct file *file, char __user *buf, 339static ssize_t dvb_ca_read(struct file *file, char __user *buf,
340 size_t count, loff_t *ppos) 340 size_t count, loff_t *ppos)
341{ 341{
342 struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; 342 struct dvb_device *dvbdev = file->private_data;
343 struct av7110 *av7110 = (struct av7110 *) dvbdev->priv; 343 struct av7110 *av7110 = dvbdev->priv;
344 344
345 dprintk(8, "av7110:%p\n",av7110); 345 dprintk(8, "av7110:%p\n",av7110);
346 return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); 346 return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos);
347} 347}
348 348
349
350
351static struct file_operations dvb_ca_fops = { 349static struct file_operations dvb_ca_fops = {
352 .owner = THIS_MODULE, 350 .owner = THIS_MODULE,
353 .read = dvb_ca_read, 351 .read = dvb_ca_read,