diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-05-08 16:55:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 00:21:40 -0400 |
commit | 3805f201934e5384f6e941222dc1968cb638a88c (patch) | |
tree | 3e50271cc998fbcb10eabac725792cc27a285153 /drivers/media | |
parent | cf69b808caf8e729949cf20446bec0b9ace033b7 (diff) |
V4L/DVB: v4l2-subdev.h: fix enum_mbus_fmt prototype
enum_mbus_fmt received an index argument that was defined as an int instead
of an unsigned int. This is now fixed. This had the knock-on effect that the
index argument in the callback get_formats in soc_camera.h also had to be
changed to unsigned int.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/ak881x.c | 2 | ||||
-rw-r--r-- | drivers/media/video/mt9m001.c | 4 | ||||
-rw-r--r-- | drivers/media/video/mt9m111.c | 4 | ||||
-rw-r--r-- | drivers/media/video/mt9t031.c | 2 | ||||
-rw-r--r-- | drivers/media/video/mt9t112.c | 4 | ||||
-rw-r--r-- | drivers/media/video/mt9v022.c | 4 | ||||
-rw-r--r-- | drivers/media/video/mx3_camera.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ov772x.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ov9640.c | 4 | ||||
-rw-r--r-- | drivers/media/video/pxa_camera.c | 4 | ||||
-rw-r--r-- | drivers/media/video/rj54n1cb0c.c | 4 | ||||
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 4 | ||||
-rw-r--r-- | drivers/media/video/soc_camera.c | 3 | ||||
-rw-r--r-- | drivers/media/video/soc_camera_platform.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tw9910.c | 2 |
15 files changed, 26 insertions, 25 deletions
diff --git a/drivers/media/video/ak881x.c b/drivers/media/video/ak881x.c index 35390d4717b9..3006a2c80f47 100644 --- a/drivers/media/video/ak881x.c +++ b/drivers/media/video/ak881x.c | |||
@@ -141,7 +141,7 @@ static int ak881x_s_mbus_fmt(struct v4l2_subdev *sd, | |||
141 | return ak881x_try_g_mbus_fmt(sd, mf); | 141 | return ak881x_try_g_mbus_fmt(sd, mf); |
142 | } | 142 | } |
143 | 143 | ||
144 | static int ak881x_enum_mbus_fmt(struct v4l2_subdev *sd, int index, | 144 | static int ak881x_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned int index, |
145 | enum v4l2_mbus_pixelcode *code) | 145 | enum v4l2_mbus_pixelcode *code) |
146 | { | 146 | { |
147 | if (index) | 147 | if (index) |
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c index b62c0bd3f8ea..992ab8cb89ae 100644 --- a/drivers/media/video/mt9m001.c +++ b/drivers/media/video/mt9m001.c | |||
@@ -701,13 +701,13 @@ static struct v4l2_subdev_core_ops mt9m001_subdev_core_ops = { | |||
701 | #endif | 701 | #endif |
702 | }; | 702 | }; |
703 | 703 | ||
704 | static int mt9m001_enum_fmt(struct v4l2_subdev *sd, int index, | 704 | static int mt9m001_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
705 | enum v4l2_mbus_pixelcode *code) | 705 | enum v4l2_mbus_pixelcode *code) |
706 | { | 706 | { |
707 | struct i2c_client *client = sd->priv; | 707 | struct i2c_client *client = sd->priv; |
708 | struct mt9m001 *mt9m001 = to_mt9m001(client); | 708 | struct mt9m001 *mt9m001 = to_mt9m001(client); |
709 | 709 | ||
710 | if ((unsigned int)index >= mt9m001->num_fmts) | 710 | if (index >= mt9m001->num_fmts) |
711 | return -EINVAL; | 711 | return -EINVAL; |
712 | 712 | ||
713 | *code = mt9m001->fmts[index].code; | 713 | *code = mt9m001->fmts[index].code; |
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index d35f536f9fc3..bac0c5d4070c 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c | |||
@@ -999,10 +999,10 @@ static struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = { | |||
999 | #endif | 999 | #endif |
1000 | }; | 1000 | }; |
1001 | 1001 | ||
1002 | static int mt9m111_enum_fmt(struct v4l2_subdev *sd, int index, | 1002 | static int mt9m111_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
1003 | enum v4l2_mbus_pixelcode *code) | 1003 | enum v4l2_mbus_pixelcode *code) |
1004 | { | 1004 | { |
1005 | if ((unsigned int)index >= ARRAY_SIZE(mt9m111_colour_fmts)) | 1005 | if (index >= ARRAY_SIZE(mt9m111_colour_fmts)) |
1006 | return -EINVAL; | 1006 | return -EINVAL; |
1007 | 1007 | ||
1008 | *code = mt9m111_colour_fmts[index].code; | 1008 | *code = mt9m111_colour_fmts[index].code; |
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c index 78b4e091d2d5..f26933a8fd8a 100644 --- a/drivers/media/video/mt9t031.c +++ b/drivers/media/video/mt9t031.c | |||
@@ -798,7 +798,7 @@ static struct v4l2_subdev_core_ops mt9t031_subdev_core_ops = { | |||
798 | #endif | 798 | #endif |
799 | }; | 799 | }; |
800 | 800 | ||
801 | static int mt9t031_enum_fmt(struct v4l2_subdev *sd, int index, | 801 | static int mt9t031_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
802 | enum v4l2_mbus_pixelcode *code) | 802 | enum v4l2_mbus_pixelcode *code) |
803 | { | 803 | { |
804 | if (index) | 804 | if (index) |
diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c index 7438f8d775ba..abe5505b9f79 100644 --- a/drivers/media/video/mt9t112.c +++ b/drivers/media/video/mt9t112.c | |||
@@ -1017,10 +1017,10 @@ static int mt9t112_try_fmt(struct v4l2_subdev *sd, | |||
1017 | return 0; | 1017 | return 0; |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | static int mt9t112_enum_fmt(struct v4l2_subdev *sd, int index, | 1020 | static int mt9t112_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
1021 | enum v4l2_mbus_pixelcode *code) | 1021 | enum v4l2_mbus_pixelcode *code) |
1022 | { | 1022 | { |
1023 | if ((unsigned int)index >= ARRAY_SIZE(mt9t112_cfmts)) | 1023 | if (index >= ARRAY_SIZE(mt9t112_cfmts)) |
1024 | return -EINVAL; | 1024 | return -EINVAL; |
1025 | 1025 | ||
1026 | *code = mt9t112_cfmts[index].code; | 1026 | *code = mt9t112_cfmts[index].code; |
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index e5bae4c9393b..c409d05d465a 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c | |||
@@ -838,13 +838,13 @@ static struct v4l2_subdev_core_ops mt9v022_subdev_core_ops = { | |||
838 | #endif | 838 | #endif |
839 | }; | 839 | }; |
840 | 840 | ||
841 | static int mt9v022_enum_fmt(struct v4l2_subdev *sd, int index, | 841 | static int mt9v022_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
842 | enum v4l2_mbus_pixelcode *code) | 842 | enum v4l2_mbus_pixelcode *code) |
843 | { | 843 | { |
844 | struct i2c_client *client = sd->priv; | 844 | struct i2c_client *client = sd->priv; |
845 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 845 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
846 | 846 | ||
847 | if ((unsigned int)index >= mt9v022->num_fmts) | 847 | if (index >= mt9v022->num_fmts) |
848 | return -EINVAL; | 848 | return -EINVAL; |
849 | 849 | ||
850 | *code = mt9v022->fmts[index].code; | 850 | *code = mt9v022->fmts[index].code; |
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index d477e3058002..a9be14c23912 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c | |||
@@ -672,7 +672,7 @@ static bool mx3_camera_packing_supported(const struct soc_mbus_pixelfmt *fmt) | |||
672 | fmt->packing == SOC_MBUS_PACKING_EXTEND16); | 672 | fmt->packing == SOC_MBUS_PACKING_EXTEND16); |
673 | } | 673 | } |
674 | 674 | ||
675 | static int mx3_camera_get_formats(struct soc_camera_device *icd, int idx, | 675 | static int mx3_camera_get_formats(struct soc_camera_device *icd, unsigned int idx, |
676 | struct soc_camera_format_xlate *xlate) | 676 | struct soc_camera_format_xlate *xlate) |
677 | { | 677 | { |
678 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 678 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
@@ -689,7 +689,7 @@ static int mx3_camera_get_formats(struct soc_camera_device *icd, int idx, | |||
689 | fmt = soc_mbus_get_fmtdesc(code); | 689 | fmt = soc_mbus_get_fmtdesc(code); |
690 | if (!fmt) { | 690 | if (!fmt) { |
691 | dev_err(icd->dev.parent, | 691 | dev_err(icd->dev.parent, |
692 | "Invalid format code #%d: %d\n", idx, code); | 692 | "Invalid format code #%u: %d\n", idx, code); |
693 | return 0; | 693 | return 0; |
694 | } | 694 | } |
695 | 695 | ||
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 7f8ece30c77b..86b0186c360c 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -1092,10 +1092,10 @@ static struct v4l2_subdev_core_ops ov772x_subdev_core_ops = { | |||
1092 | #endif | 1092 | #endif |
1093 | }; | 1093 | }; |
1094 | 1094 | ||
1095 | static int ov772x_enum_fmt(struct v4l2_subdev *sd, int index, | 1095 | static int ov772x_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
1096 | enum v4l2_mbus_pixelcode *code) | 1096 | enum v4l2_mbus_pixelcode *code) |
1097 | { | 1097 | { |
1098 | if ((unsigned int)index >= ARRAY_SIZE(ov772x_cfmts)) | 1098 | if (index >= ARRAY_SIZE(ov772x_cfmts)) |
1099 | return -EINVAL; | 1099 | return -EINVAL; |
1100 | 1100 | ||
1101 | *code = ov772x_cfmts[index].code; | 1101 | *code = ov772x_cfmts[index].code; |
diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c index 36599a65f548..58811c044c6a 100644 --- a/drivers/media/video/ov9640.c +++ b/drivers/media/video/ov9640.c | |||
@@ -614,10 +614,10 @@ static int ov9640_try_fmt(struct v4l2_subdev *sd, | |||
614 | return 0; | 614 | return 0; |
615 | } | 615 | } |
616 | 616 | ||
617 | static int ov9640_enum_fmt(struct v4l2_subdev *sd, int index, | 617 | static int ov9640_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
618 | enum v4l2_mbus_pixelcode *code) | 618 | enum v4l2_mbus_pixelcode *code) |
619 | { | 619 | { |
620 | if ((unsigned int)index >= ARRAY_SIZE(ov9640_codes)) | 620 | if (index >= ARRAY_SIZE(ov9640_codes)) |
621 | return -EINVAL; | 621 | return -EINVAL; |
622 | 622 | ||
623 | *code = ov9640_codes[index]; | 623 | *code = ov9640_codes[index]; |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 7fe70e718656..fb242f6cfb1f 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -1247,7 +1247,7 @@ static bool pxa_camera_packing_supported(const struct soc_mbus_pixelfmt *fmt) | |||
1247 | fmt->packing == SOC_MBUS_PACKING_EXTEND16); | 1247 | fmt->packing == SOC_MBUS_PACKING_EXTEND16); |
1248 | } | 1248 | } |
1249 | 1249 | ||
1250 | static int pxa_camera_get_formats(struct soc_camera_device *icd, int idx, | 1250 | static int pxa_camera_get_formats(struct soc_camera_device *icd, unsigned int idx, |
1251 | struct soc_camera_format_xlate *xlate) | 1251 | struct soc_camera_format_xlate *xlate) |
1252 | { | 1252 | { |
1253 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 1253 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
@@ -1264,7 +1264,7 @@ static int pxa_camera_get_formats(struct soc_camera_device *icd, int idx, | |||
1264 | 1264 | ||
1265 | fmt = soc_mbus_get_fmtdesc(code); | 1265 | fmt = soc_mbus_get_fmtdesc(code); |
1266 | if (!fmt) { | 1266 | if (!fmt) { |
1267 | dev_err(dev, "Invalid format code #%d: %d\n", idx, code); | 1267 | dev_err(dev, "Invalid format code #%u: %d\n", idx, code); |
1268 | return 0; | 1268 | return 0; |
1269 | } | 1269 | } |
1270 | 1270 | ||
diff --git a/drivers/media/video/rj54n1cb0c.c b/drivers/media/video/rj54n1cb0c.c index bbd9c11e2c5a..64eb05ce5603 100644 --- a/drivers/media/video/rj54n1cb0c.c +++ b/drivers/media/video/rj54n1cb0c.c | |||
@@ -481,10 +481,10 @@ static int reg_write_multiple(struct i2c_client *client, | |||
481 | return 0; | 481 | return 0; |
482 | } | 482 | } |
483 | 483 | ||
484 | static int rj54n1_enum_fmt(struct v4l2_subdev *sd, int index, | 484 | static int rj54n1_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
485 | enum v4l2_mbus_pixelcode *code) | 485 | enum v4l2_mbus_pixelcode *code) |
486 | { | 486 | { |
487 | if ((unsigned int)index >= ARRAY_SIZE(rj54n1_colour_fmts)) | 487 | if (index >= ARRAY_SIZE(rj54n1_colour_fmts)) |
488 | return -EINVAL; | 488 | return -EINVAL; |
489 | 489 | ||
490 | *code = rj54n1_colour_fmts[index].code; | 490 | *code = rj54n1_colour_fmts[index].code; |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 4ac3b482fbb4..961bfa2fea97 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -878,7 +878,7 @@ static bool sh_mobile_ceu_packing_supported(const struct soc_mbus_pixelfmt *fmt) | |||
878 | 878 | ||
879 | static int client_g_rect(struct v4l2_subdev *sd, struct v4l2_rect *rect); | 879 | static int client_g_rect(struct v4l2_subdev *sd, struct v4l2_rect *rect); |
880 | 880 | ||
881 | static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, int idx, | 881 | static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, unsigned int idx, |
882 | struct soc_camera_format_xlate *xlate) | 882 | struct soc_camera_format_xlate *xlate) |
883 | { | 883 | { |
884 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 884 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
@@ -897,7 +897,7 @@ static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, int idx, | |||
897 | fmt = soc_mbus_get_fmtdesc(code); | 897 | fmt = soc_mbus_get_fmtdesc(code); |
898 | if (!fmt) { | 898 | if (!fmt) { |
899 | dev_err(icd->dev.parent, | 899 | dev_err(icd->dev.parent, |
900 | "Invalid format code #%d: %d\n", idx, code); | 900 | "Invalid format code #%u: %d\n", idx, code); |
901 | return -EINVAL; | 901 | return -EINVAL; |
902 | } | 902 | } |
903 | 903 | ||
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index db1ca0e90d76..475757bfd7ba 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -200,7 +200,8 @@ static int soc_camera_init_user_formats(struct soc_camera_device *icd) | |||
200 | { | 200 | { |
201 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 201 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
202 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | 202 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); |
203 | int i, fmts = 0, raw_fmts = 0, ret; | 203 | unsigned int i, fmts = 0, raw_fmts = 0; |
204 | int ret; | ||
204 | enum v4l2_mbus_pixelcode code; | 205 | enum v4l2_mbus_pixelcode code; |
205 | 206 | ||
206 | while (!v4l2_subdev_call(sd, video, enum_mbus_fmt, raw_fmts, &code)) | 207 | while (!v4l2_subdev_call(sd, video, enum_mbus_fmt, raw_fmts, &code)) |
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c index 10b003a8be83..248c986f0989 100644 --- a/drivers/media/video/soc_camera_platform.c +++ b/drivers/media/video/soc_camera_platform.c | |||
@@ -71,7 +71,7 @@ static int soc_camera_platform_try_fmt(struct v4l2_subdev *sd, | |||
71 | 71 | ||
72 | static struct v4l2_subdev_core_ops platform_subdev_core_ops; | 72 | static struct v4l2_subdev_core_ops platform_subdev_core_ops; |
73 | 73 | ||
74 | static int soc_camera_platform_enum_fmt(struct v4l2_subdev *sd, int index, | 74 | static int soc_camera_platform_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
75 | enum v4l2_mbus_pixelcode *code) | 75 | enum v4l2_mbus_pixelcode *code) |
76 | { | 76 | { |
77 | struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd); | 77 | struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd); |
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 76be733eabfd..2f3b1942e027 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -903,7 +903,7 @@ static struct v4l2_subdev_core_ops tw9910_subdev_core_ops = { | |||
903 | #endif | 903 | #endif |
904 | }; | 904 | }; |
905 | 905 | ||
906 | static int tw9910_enum_fmt(struct v4l2_subdev *sd, int index, | 906 | static int tw9910_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
907 | enum v4l2_mbus_pixelcode *code) | 907 | enum v4l2_mbus_pixelcode *code) |
908 | { | 908 | { |
909 | if (index) | 909 | if (index) |