aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/davinci/vpif_capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/davinci/vpif_capture.c')
-rw-r--r--drivers/media/video/davinci/vpif_capture.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c
index a7f48b53d3fc..6ac6acd16352 100644
--- a/drivers/media/video/davinci/vpif_capture.c
+++ b/drivers/media/video/davinci/vpif_capture.c
@@ -731,7 +731,6 @@ static int vpif_mmap(struct file *filep, struct vm_area_struct *vma)
731 */ 731 */
732static unsigned int vpif_poll(struct file *filep, poll_table * wait) 732static unsigned int vpif_poll(struct file *filep, poll_table * wait)
733{ 733{
734 int err = 0;
735 struct vpif_fh *fh = filep->private_data; 734 struct vpif_fh *fh = filep->private_data;
736 struct channel_obj *channel = fh->channel; 735 struct channel_obj *channel = fh->channel;
737 struct common_obj *common = &(channel->common[VPIF_VIDEO_INDEX]); 736 struct common_obj *common = &(channel->common[VPIF_VIDEO_INDEX]);
@@ -739,8 +738,7 @@ static unsigned int vpif_poll(struct file *filep, poll_table * wait)
739 vpif_dbg(2, debug, "vpif_poll\n"); 738 vpif_dbg(2, debug, "vpif_poll\n");
740 739
741 if (common->started) 740 if (common->started)
742 err = videobuf_poll_stream(filep, &common->buffer_queue, wait); 741 return videobuf_poll_stream(filep, &common->buffer_queue, wait);
743
744 return 0; 742 return 0;
745} 743}
746 744
@@ -793,7 +791,7 @@ static int vpif_open(struct file *filep)
793 } 791 }
794 792
795 /* Allocate memory for the file handle object */ 793 /* Allocate memory for the file handle object */
796 fh = kmalloc(sizeof(struct vpif_fh), GFP_KERNEL); 794 fh = kzalloc(sizeof(struct vpif_fh), GFP_KERNEL);
797 if (NULL == fh) { 795 if (NULL == fh) {
798 vpif_err("unable to allocate memory for file handle object\n"); 796 vpif_err("unable to allocate memory for file handle object\n");
799 ret = -ENOMEM; 797 ret = -ENOMEM;
@@ -929,7 +927,8 @@ static int vpif_reqbufs(struct file *file, void *priv,
929 &common->irqlock, 927 &common->irqlock,
930 reqbuf->type, 928 reqbuf->type,
931 common->fmt.fmt.pix.field, 929 common->fmt.fmt.pix.field,
932 sizeof(struct videobuf_buffer), fh); 930 sizeof(struct videobuf_buffer), fh,
931 NULL);
933 932
934 /* Set io allowed member of file handle to TRUE */ 933 /* Set io allowed member of file handle to TRUE */
935 fh->io_allowed[index] = 1; 934 fh->io_allowed[index] = 1;
@@ -1030,9 +1029,10 @@ static int vpif_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
1030 goto qbuf_exit; 1029 goto qbuf_exit;
1031 1030
1032 if ((VIDEOBUF_NEEDS_INIT != buf1->state) 1031 if ((VIDEOBUF_NEEDS_INIT != buf1->state)
1033 && (buf1->baddr != tbuf.m.userptr)) 1032 && (buf1->baddr != tbuf.m.userptr)) {
1034 vpif_buffer_release(&common->buffer_queue, buf1); 1033 vpif_buffer_release(&common->buffer_queue, buf1);
1035 buf1->baddr = tbuf.m.userptr; 1034 buf1->baddr = tbuf.m.userptr;
1035 }
1036 break; 1036 break;
1037 1037
1038 default: 1038 default:
@@ -1994,7 +1994,7 @@ static __init int vpif_probe(struct platform_device *pdev)
1994 config = pdev->dev.platform_data; 1994 config = pdev->dev.platform_data;
1995 1995
1996 subdev_count = config->subdev_count; 1996 subdev_count = config->subdev_count;
1997 vpif_obj.sd = kmalloc(sizeof(struct v4l2_subdev *) * subdev_count, 1997 vpif_obj.sd = kzalloc(sizeof(struct v4l2_subdev *) * subdev_count,
1998 GFP_KERNEL); 1998 GFP_KERNEL);
1999 if (vpif_obj.sd == NULL) { 1999 if (vpif_obj.sd == NULL) {
2000 vpif_err("unable to allocate memory for subdevice pointers\n"); 2000 vpif_err("unable to allocate memory for subdevice pointers\n");
@@ -2013,7 +2013,7 @@ static __init int vpif_probe(struct platform_device *pdev)
2013 vpif_obj.sd[i] = 2013 vpif_obj.sd[i] =
2014 v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev, 2014 v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev,
2015 i2c_adap, 2015 i2c_adap,
2016 subdevdata->name, 2016 NULL,
2017 &subdevdata->board_info, 2017 &subdevdata->board_info,
2018 NULL); 2018 NULL);
2019 2019
@@ -2113,7 +2113,7 @@ static const struct dev_pm_ops vpif_dev_pm_ops = {
2113 .resume = vpif_resume, 2113 .resume = vpif_resume,
2114}; 2114};
2115 2115
2116static struct platform_driver vpif_driver = { 2116static __refdata struct platform_driver vpif_driver = {
2117 .driver = { 2117 .driver = {
2118 .name = "vpif_capture", 2118 .name = "vpif_capture",
2119 .owner = THIS_MODULE, 2119 .owner = THIS_MODULE,