aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-07-12 16:50:03 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:42:53 -0400
commitabf84383ecadc8ada1963f9976e887c6f0b1bad9 (patch)
tree34f369a2f7ee7dc3f42d36f487219fbd0782a265
parent1676e4ab55944d483695f51e46b1e629af59706e (diff)
V4L/DVB: drivers/media: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jarod Wilson <jarod@redhat.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/IR/imon.c6
-rw-r--r--drivers/media/common/saa7146_vbi.c4
-rw-r--r--drivers/media/common/saa7146_video.c4
-rw-r--r--drivers/media/dvb/bt8xx/dst_ca.c2
-rw-r--r--drivers/media/video/cx18/cx18-ioctl.c2
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c2
-rw-r--r--drivers/media/video/hdpvr/hdpvr-video.c4
-rw-r--r--drivers/media/video/mem2mem_testdev.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c2
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c8
10 files changed, 19 insertions, 19 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index 0195dd5ac07..65c125e44e9 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -407,7 +407,7 @@ static int display_close(struct inode *inode, struct file *file)
407 struct imon_context *ictx = NULL; 407 struct imon_context *ictx = NULL;
408 int retval = 0; 408 int retval = 0;
409 409
410 ictx = (struct imon_context *)file->private_data; 410 ictx = file->private_data;
411 411
412 if (!ictx) { 412 if (!ictx) {
413 err("%s: no context for device", __func__); 413 err("%s: no context for device", __func__);
@@ -812,7 +812,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
812 const unsigned char vfd_packet6[] = { 812 const unsigned char vfd_packet6[] = {
813 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; 813 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
814 814
815 ictx = (struct imon_context *)file->private_data; 815 ictx = file->private_data;
816 if (!ictx) { 816 if (!ictx) {
817 err("%s: no context for device", __func__); 817 err("%s: no context for device", __func__);
818 return -ENODEV; 818 return -ENODEV;
@@ -896,7 +896,7 @@ static ssize_t lcd_write(struct file *file, const char *buf,
896 int retval = 0; 896 int retval = 0;
897 struct imon_context *ictx; 897 struct imon_context *ictx;
898 898
899 ictx = (struct imon_context *)file->private_data; 899 ictx = file->private_data;
900 if (!ictx) { 900 if (!ictx) {
901 err("%s: no context for device", __func__); 901 err("%s: no context for device", __func__);
902 return -ENODEV; 902 return -ENODEV;
diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
index 74e2b56ecb5..8224c301d05 100644
--- a/drivers/media/common/saa7146_vbi.c
+++ b/drivers/media/common/saa7146_vbi.c
@@ -375,7 +375,7 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
375 375
376static int vbi_open(struct saa7146_dev *dev, struct file *file) 376static int vbi_open(struct saa7146_dev *dev, struct file *file)
377{ 377{
378 struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data; 378 struct saa7146_fh *fh = file->private_data;
379 379
380 u32 arbtr_ctrl = saa7146_read(dev, PCI_BT_V1); 380 u32 arbtr_ctrl = saa7146_read(dev, PCI_BT_V1);
381 int ret = 0; 381 int ret = 0;
@@ -437,7 +437,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
437 437
438static void vbi_close(struct saa7146_dev *dev, struct file *file) 438static void vbi_close(struct saa7146_dev *dev, struct file *file)
439{ 439{
440 struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data; 440 struct saa7146_fh *fh = file->private_data;
441 struct saa7146_vv *vv = dev->vv_data; 441 struct saa7146_vv *vv = dev->vv_data;
442 DEB_VBI(("dev:%p, fh:%p\n",dev,fh)); 442 DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
443 443
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index b8b2c551a1e..a212a91a30f 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1370,7 +1370,7 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
1370 1370
1371static int video_open(struct saa7146_dev *dev, struct file *file) 1371static int video_open(struct saa7146_dev *dev, struct file *file)
1372{ 1372{
1373 struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data; 1373 struct saa7146_fh *fh = file->private_data;
1374 struct saa7146_format *sfmt; 1374 struct saa7146_format *sfmt;
1375 1375
1376 fh->video_fmt.width = 384; 1376 fh->video_fmt.width = 384;
@@ -1394,7 +1394,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
1394 1394
1395static void video_close(struct saa7146_dev *dev, struct file *file) 1395static void video_close(struct saa7146_dev *dev, struct file *file)
1396{ 1396{
1397 struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data; 1397 struct saa7146_fh *fh = file->private_data;
1398 struct saa7146_vv *vv = dev->vv_data; 1398 struct saa7146_vv *vv = dev->vv_data;
1399 struct videobuf_queue *q = &fh->video_q; 1399 struct videobuf_queue *q = &fh->video_q;
1400 int err; 1400 int err;
diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c
index 770243c720d..cf870516284 100644
--- a/drivers/media/dvb/bt8xx/dst_ca.c
+++ b/drivers/media/dvb/bt8xx/dst_ca.c
@@ -565,7 +565,7 @@ static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long ioct
565 int result = 0; 565 int result = 0;
566 566
567 lock_kernel(); 567 lock_kernel();
568 dvbdev = (struct dvb_device *)file->private_data; 568 dvbdev = file->private_data;
569 state = (struct dst_state *)dvbdev->priv; 569 state = (struct dst_state *)dvbdev->priv;
570 p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL); 570 p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL);
571 p_ca_slot_info = kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL); 571 p_ca_slot_info = kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL);
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c
index 20eaf38ba95..d6792405f8d 100644
--- a/drivers/media/video/cx18/cx18-ioctl.c
+++ b/drivers/media/video/cx18/cx18-ioctl.c
@@ -1081,7 +1081,7 @@ long cx18_v4l2_ioctl(struct file *filp, unsigned int cmd,
1081 unsigned long arg) 1081 unsigned long arg)
1082{ 1082{
1083 struct video_device *vfd = video_devdata(filp); 1083 struct video_device *vfd = video_devdata(filp);
1084 struct cx18_open_id *id = (struct cx18_open_id *)filp->private_data; 1084 struct cx18_open_id *id = filp->private_data;
1085 struct cx18 *cx = id->cx; 1085 struct cx18 *cx = id->cx;
1086 long res; 1086 long res;
1087 1087
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index 9209d5b87e0..4f383cdf529 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -739,7 +739,7 @@ static int __devinit snd_cx88_create(struct snd_card *card,
739 739
740 pci_set_master(pci); 740 pci_set_master(pci);
741 741
742 chip = (snd_cx88_card_t *) card->private_data; 742 chip = card->private_data;
743 743
744 core = cx88_core_get(pci); 744 core = cx88_core_get(pci);
745 if (NULL == core) { 745 if (NULL == core) {
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c
index c338f3f62e7..4863a21b1f2 100644
--- a/drivers/media/video/hdpvr/hdpvr-video.c
+++ b/drivers/media/video/hdpvr/hdpvr-video.c
@@ -394,7 +394,7 @@ err:
394 394
395static int hdpvr_release(struct file *file) 395static int hdpvr_release(struct file *file)
396{ 396{
397 struct hdpvr_fh *fh = (struct hdpvr_fh *)file->private_data; 397 struct hdpvr_fh *fh = file->private_data;
398 struct hdpvr_device *dev = fh->dev; 398 struct hdpvr_device *dev = fh->dev;
399 399
400 if (!dev) 400 if (!dev)
@@ -518,7 +518,7 @@ err:
518static unsigned int hdpvr_poll(struct file *filp, poll_table *wait) 518static unsigned int hdpvr_poll(struct file *filp, poll_table *wait)
519{ 519{
520 struct hdpvr_buffer *buf = NULL; 520 struct hdpvr_buffer *buf = NULL;
521 struct hdpvr_fh *fh = (struct hdpvr_fh *)filp->private_data; 521 struct hdpvr_fh *fh = filp->private_data;
522 struct hdpvr_device *dev = fh->dev; 522 struct hdpvr_device *dev = fh->dev;
523 unsigned int mask = 0; 523 unsigned int mask = 0;
524 524
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c
index 10ddeccc70e..4525335f9bd 100644
--- a/drivers/media/video/mem2mem_testdev.c
+++ b/drivers/media/video/mem2mem_testdev.c
@@ -903,14 +903,14 @@ static int m2mtest_release(struct file *file)
903static unsigned int m2mtest_poll(struct file *file, 903static unsigned int m2mtest_poll(struct file *file,
904 struct poll_table_struct *wait) 904 struct poll_table_struct *wait)
905{ 905{
906 struct m2mtest_ctx *ctx = (struct m2mtest_ctx *)file->private_data; 906 struct m2mtest_ctx *ctx = file->private_data;
907 907
908 return v4l2_m2m_poll(file, ctx->m2m_ctx, wait); 908 return v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
909} 909}
910 910
911static int m2mtest_mmap(struct file *file, struct vm_area_struct *vma) 911static int m2mtest_mmap(struct file *file, struct vm_area_struct *vma)
912{ 912{
913 struct m2mtest_ctx *ctx = (struct m2mtest_ctx *)file->private_data; 913 struct m2mtest_ctx *ctx = file->private_data;
914 914
915 return v4l2_m2m_mmap(file, ctx->m2m_ctx, vma); 915 return v4l2_m2m_mmap(file, ctx->m2m_ctx, vma);
916} 916}
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 68b7e8d10de..10460fd3ce3 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -1080,7 +1080,7 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
1080 /* Card "creation" */ 1080 /* Card "creation" */
1081 1081
1082 card->private_free = snd_saa7134_free; 1082 card->private_free = snd_saa7134_free;
1083 chip = (snd_card_saa7134_t *) card->private_data; 1083 chip = card->private_data;
1084 1084
1085 spin_lock_init(&chip->lock); 1085 spin_lock_init(&chip->lock);
1086 spin_lock_init(&chip->mixer_lock); 1086 spin_lock_init(&chip->mixer_lock);
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index 369ce06be03..86db32697b8 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -516,7 +516,7 @@ static int uvc_v4l2_open(struct file *file)
516 516
517static int uvc_v4l2_release(struct file *file) 517static int uvc_v4l2_release(struct file *file)
518{ 518{
519 struct uvc_fh *handle = (struct uvc_fh *)file->private_data; 519 struct uvc_fh *handle = file->private_data;
520 struct uvc_streaming *stream = handle->stream; 520 struct uvc_streaming *stream = handle->stream;
521 521
522 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n"); 522 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n");
@@ -547,7 +547,7 @@ static int uvc_v4l2_release(struct file *file)
547static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) 547static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
548{ 548{
549 struct video_device *vdev = video_devdata(file); 549 struct video_device *vdev = video_devdata(file);
550 struct uvc_fh *handle = (struct uvc_fh *)file->private_data; 550 struct uvc_fh *handle = file->private_data;
551 struct uvc_video_chain *chain = handle->chain; 551 struct uvc_video_chain *chain = handle->chain;
552 struct uvc_streaming *stream = handle->stream; 552 struct uvc_streaming *stream = handle->stream;
553 long ret = 0; 553 long ret = 0;
@@ -1116,7 +1116,7 @@ static const struct vm_operations_struct uvc_vm_ops = {
1116 1116
1117static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma) 1117static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
1118{ 1118{
1119 struct uvc_fh *handle = (struct uvc_fh *)file->private_data; 1119 struct uvc_fh *handle = file->private_data;
1120 struct uvc_streaming *stream = handle->stream; 1120 struct uvc_streaming *stream = handle->stream;
1121 struct uvc_video_queue *queue = &stream->queue; 1121 struct uvc_video_queue *queue = &stream->queue;
1122 struct uvc_buffer *uninitialized_var(buffer); 1122 struct uvc_buffer *uninitialized_var(buffer);
@@ -1171,7 +1171,7 @@ done:
1171 1171
1172static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) 1172static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait)
1173{ 1173{
1174 struct uvc_fh *handle = (struct uvc_fh *)file->private_data; 1174 struct uvc_fh *handle = file->private_data;
1175 struct uvc_streaming *stream = handle->stream; 1175 struct uvc_streaming *stream = handle->stream;
1176 1176
1177 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n"); 1177 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n");