diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-05-01 07:03:24 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:58:54 -0400 |
commit | ffb4877ba013f94322083f77cbb05b35c2a218aa (patch) | |
tree | 0d041da73986e1dc7c845ff4418fb20f46bd7506 /drivers/media/video/davinci | |
parent | 530d2d32068eaf3616e0ce9e58a5fde5701c3380 (diff) |
V4L/DVB: v4l2-common: simplify prio utility functions
v4l2_prio_init/open/close returned an int when in fact they would
always return 0. Make these void functions.
v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a
pointer for no good reason. Replace with a normal enum v4l2_priority
argument.
These changes will simplify the work of moving priority handling into
the v4l core.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/davinci')
-rw-r--r-- | drivers/media/video/davinci/vpfe_capture.c | 2 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif_capture.c | 8 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif_display.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index f6648f6ba2fc..1c2588247289 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
@@ -736,7 +736,7 @@ static int vpfe_release(struct file *file) | |||
736 | /* Decrement device usrs counter */ | 736 | /* Decrement device usrs counter */ |
737 | vpfe_dev->usrs--; | 737 | vpfe_dev->usrs--; |
738 | /* Close the priority */ | 738 | /* Close the priority */ |
739 | v4l2_prio_close(&vpfe_dev->prio, &fh->prio); | 739 | v4l2_prio_close(&vpfe_dev->prio, fh->prio); |
740 | /* If this is the last file handle */ | 740 | /* If this is the last file handle */ |
741 | if (!vpfe_dev->usrs) { | 741 | if (!vpfe_dev->usrs) { |
742 | vpfe_dev->initialized = 0; | 742 | vpfe_dev->initialized = 0; |
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index 2e5a7fb2d0c9..a7f48b53d3fc 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c | |||
@@ -869,7 +869,7 @@ static int vpif_release(struct file *filep) | |||
869 | mutex_unlock(&common->lock); | 869 | mutex_unlock(&common->lock); |
870 | 870 | ||
871 | /* Close the priority */ | 871 | /* Close the priority */ |
872 | v4l2_prio_close(&ch->prio, &fh->prio); | 872 | v4l2_prio_close(&ch->prio, fh->prio); |
873 | 873 | ||
874 | if (fh->initialized) | 874 | if (fh->initialized) |
875 | ch->initialized = 0; | 875 | ch->initialized = 0; |
@@ -1444,7 +1444,7 @@ static int vpif_s_std(struct file *file, void *priv, v4l2_std_id *std_id) | |||
1444 | } | 1444 | } |
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | ret = v4l2_prio_check(&ch->prio, &fh->prio); | 1447 | ret = v4l2_prio_check(&ch->prio, fh->prio); |
1448 | if (0 != ret) | 1448 | if (0 != ret) |
1449 | return ret; | 1449 | return ret; |
1450 | 1450 | ||
@@ -1554,7 +1554,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) | |||
1554 | } | 1554 | } |
1555 | } | 1555 | } |
1556 | 1556 | ||
1557 | ret = v4l2_prio_check(&ch->prio, &fh->prio); | 1557 | ret = v4l2_prio_check(&ch->prio, fh->prio); |
1558 | if (0 != ret) | 1558 | if (0 != ret) |
1559 | return ret; | 1559 | return ret; |
1560 | 1560 | ||
@@ -1710,7 +1710,7 @@ static int vpif_s_fmt_vid_cap(struct file *file, void *priv, | |||
1710 | } | 1710 | } |
1711 | } | 1711 | } |
1712 | 1712 | ||
1713 | ret = v4l2_prio_check(&ch->prio, &fh->prio); | 1713 | ret = v4l2_prio_check(&ch->prio, fh->prio); |
1714 | if (0 != ret) | 1714 | if (0 != ret) |
1715 | return ret; | 1715 | return ret; |
1716 | 1716 | ||
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index e5bab3d0d53f..da07607cbc55 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c | |||
@@ -671,7 +671,7 @@ static int vpif_release(struct file *filep) | |||
671 | ch->initialized = 0; | 671 | ch->initialized = 0; |
672 | 672 | ||
673 | /* Close the priority */ | 673 | /* Close the priority */ |
674 | v4l2_prio_close(&ch->prio, &fh->prio); | 674 | v4l2_prio_close(&ch->prio, fh->prio); |
675 | filep->private_data = NULL; | 675 | filep->private_data = NULL; |
676 | fh->initialized = 0; | 676 | fh->initialized = 0; |
677 | kfree(fh); | 677 | kfree(fh); |
@@ -753,7 +753,7 @@ static int vpif_s_fmt_vid_out(struct file *file, void *priv, | |||
753 | } | 753 | } |
754 | 754 | ||
755 | /* Check for the priority */ | 755 | /* Check for the priority */ |
756 | ret = v4l2_prio_check(&ch->prio, &fh->prio); | 756 | ret = v4l2_prio_check(&ch->prio, fh->prio); |
757 | if (0 != ret) | 757 | if (0 != ret) |
758 | return ret; | 758 | return ret; |
759 | fh->initialized = 1; | 759 | fh->initialized = 1; |