diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-24 07:28:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-24 07:47:01 -0400 |
commit | 977ba3b1b73f24fae2d0c8bd59d7a4696f1e0ccc (patch) | |
tree | 8a30d06717aacc154e851868c40e2596c3a572be | |
parent | b5656e8b7363c4e248e6372dc34828d3dfb17832 (diff) |
[media] v4l2: add const to argument of write-only s_register ioctl
This ioctl is defined as IOW, so pass the argument as const.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
69 files changed, 96 insertions, 102 deletions
diff --git a/drivers/media/dvb-frontends/au8522_decoder.c b/drivers/media/dvb-frontends/au8522_decoder.c index 5243ba6295cc..526902b45f9c 100644 --- a/drivers/media/dvb-frontends/au8522_decoder.c +++ b/drivers/media/dvb-frontends/au8522_decoder.c | |||
@@ -583,7 +583,7 @@ static int au8522_g_register(struct v4l2_subdev *sd, | |||
583 | } | 583 | } |
584 | 584 | ||
585 | static int au8522_s_register(struct v4l2_subdev *sd, | 585 | static int au8522_s_register(struct v4l2_subdev *sd, |
586 | struct v4l2_dbg_register *reg) | 586 | const struct v4l2_dbg_register *reg) |
587 | { | 587 | { |
588 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 588 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
589 | struct au8522_state *state = to_state(sd); | 589 | struct au8522_state *state = to_state(sd); |
diff --git a/drivers/media/i2c/ad9389b.c b/drivers/media/i2c/ad9389b.c index c2886b6a727d..58344b6c3a55 100644 --- a/drivers/media/i2c/ad9389b.c +++ b/drivers/media/i2c/ad9389b.c | |||
@@ -354,7 +354,7 @@ static int ad9389b_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
354 | return 0; | 354 | return 0; |
355 | } | 355 | } |
356 | 356 | ||
357 | static int ad9389b_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 357 | static int ad9389b_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
358 | { | 358 | { |
359 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 359 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
360 | 360 | ||
diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index 6fed5b74e743..56a1fa4af0fe 100644 --- a/drivers/media/i2c/adv7183.c +++ b/drivers/media/i2c/adv7183.c | |||
@@ -507,7 +507,7 @@ static int adv7183_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
507 | return 0; | 507 | return 0; |
508 | } | 508 | } |
509 | 509 | ||
510 | static int adv7183_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 510 | static int adv7183_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
511 | { | 511 | { |
512 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 512 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
513 | 513 | ||
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index f47555b1000a..31a63c9324fe 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c | |||
@@ -699,7 +699,7 @@ static int adv7604_g_register(struct v4l2_subdev *sd, | |||
699 | } | 699 | } |
700 | 700 | ||
701 | static int adv7604_s_register(struct v4l2_subdev *sd, | 701 | static int adv7604_s_register(struct v4l2_subdev *sd, |
702 | struct v4l2_dbg_register *reg) | 702 | const struct v4l2_dbg_register *reg) |
703 | { | 703 | { |
704 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 704 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
705 | 705 | ||
diff --git a/drivers/media/i2c/ak881x.c b/drivers/media/i2c/ak881x.c index ba674656b10d..fd47465e4f6a 100644 --- a/drivers/media/i2c/ak881x.c +++ b/drivers/media/i2c/ak881x.c | |||
@@ -101,7 +101,7 @@ static int ak881x_g_register(struct v4l2_subdev *sd, | |||
101 | } | 101 | } |
102 | 102 | ||
103 | static int ak881x_s_register(struct v4l2_subdev *sd, | 103 | static int ak881x_s_register(struct v4l2_subdev *sd, |
104 | struct v4l2_dbg_register *reg) | 104 | const struct v4l2_dbg_register *reg) |
105 | { | 105 | { |
106 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 106 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
107 | 107 | ||
diff --git a/drivers/media/i2c/cs5345.c b/drivers/media/i2c/cs5345.c index c8581e26fa9c..1d2f7c8512b5 100644 --- a/drivers/media/i2c/cs5345.c +++ b/drivers/media/i2c/cs5345.c | |||
@@ -110,7 +110,7 @@ static int cs5345_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r | |||
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | static int cs5345_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 113 | static int cs5345_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
114 | { | 114 | { |
115 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 115 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
116 | 116 | ||
diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index 234b7c63d087..12fb9b2eb887 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c | |||
@@ -1671,7 +1671,7 @@ static int cx25840_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
1671 | return 0; | 1671 | return 0; |
1672 | } | 1672 | } |
1673 | 1673 | ||
1674 | static int cx25840_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 1674 | static int cx25840_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
1675 | { | 1675 | { |
1676 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 1676 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
1677 | 1677 | ||
diff --git a/drivers/media/i2c/m52790.c b/drivers/media/i2c/m52790.c index 0991576f4c82..39f50fd2b8d2 100644 --- a/drivers/media/i2c/m52790.c +++ b/drivers/media/i2c/m52790.c | |||
@@ -96,7 +96,7 @@ static int m52790_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r | |||
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | static int m52790_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 99 | static int m52790_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
100 | { | 100 | { |
101 | struct m52790_state *state = to_state(sd); | 101 | struct m52790_state *state = to_state(sd); |
102 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 102 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
diff --git a/drivers/media/i2c/mt9m032.c b/drivers/media/i2c/mt9m032.c index f80c1d7ec884..2526b66b91fd 100644 --- a/drivers/media/i2c/mt9m032.c +++ b/drivers/media/i2c/mt9m032.c | |||
@@ -548,7 +548,7 @@ static int mt9m032_g_register(struct v4l2_subdev *sd, | |||
548 | } | 548 | } |
549 | 549 | ||
550 | static int mt9m032_s_register(struct v4l2_subdev *sd, | 550 | static int mt9m032_s_register(struct v4l2_subdev *sd, |
551 | struct v4l2_dbg_register *reg) | 551 | const struct v4l2_dbg_register *reg) |
552 | { | 552 | { |
553 | struct mt9m032 *sensor = to_mt9m032(sd); | 553 | struct mt9m032 *sensor = to_mt9m032(sd); |
554 | struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); | 554 | struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); |
diff --git a/drivers/media/i2c/mt9v011.c b/drivers/media/i2c/mt9v011.c index 73b7688cbebd..3f415fd12de3 100644 --- a/drivers/media/i2c/mt9v011.c +++ b/drivers/media/i2c/mt9v011.c | |||
@@ -421,7 +421,7 @@ static int mt9v011_g_register(struct v4l2_subdev *sd, | |||
421 | } | 421 | } |
422 | 422 | ||
423 | static int mt9v011_s_register(struct v4l2_subdev *sd, | 423 | static int mt9v011_s_register(struct v4l2_subdev *sd, |
424 | struct v4l2_dbg_register *reg) | 424 | const struct v4l2_dbg_register *reg) |
425 | { | 425 | { |
426 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 426 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
427 | 427 | ||
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 05ed5b8e7f88..617ad3fff4aa 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c | |||
@@ -1487,7 +1487,7 @@ static int ov7670_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r | |||
1487 | return ret; | 1487 | return ret; |
1488 | } | 1488 | } |
1489 | 1489 | ||
1490 | static int ov7670_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 1490 | static int ov7670_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
1491 | { | 1491 | { |
1492 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 1492 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
1493 | 1493 | ||
diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c index 6b6788cd08f6..5d9d0330b3df 100644 --- a/drivers/media/i2c/saa7115.c +++ b/drivers/media/i2c/saa7115.c | |||
@@ -1428,7 +1428,7 @@ static int saa711x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
1428 | return 0; | 1428 | return 0; |
1429 | } | 1429 | } |
1430 | 1430 | ||
1431 | static int saa711x_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 1431 | static int saa711x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
1432 | { | 1432 | { |
1433 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 1433 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
1434 | 1434 | ||
diff --git a/drivers/media/i2c/saa7127.c b/drivers/media/i2c/saa7127.c index b745f68fbc92..8a47ac10927f 100644 --- a/drivers/media/i2c/saa7127.c +++ b/drivers/media/i2c/saa7127.c | |||
@@ -672,7 +672,7 @@ static int saa7127_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
672 | return 0; | 672 | return 0; |
673 | } | 673 | } |
674 | 674 | ||
675 | static int saa7127_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 675 | static int saa7127_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
676 | { | 676 | { |
677 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 677 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
678 | 678 | ||
diff --git a/drivers/media/i2c/saa717x.c b/drivers/media/i2c/saa717x.c index 5608b937f8b2..cf3a0aa7e45e 100644 --- a/drivers/media/i2c/saa717x.c +++ b/drivers/media/i2c/saa717x.c | |||
@@ -988,7 +988,7 @@ static int saa717x_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
988 | return 0; | 988 | return 0; |
989 | } | 989 | } |
990 | 990 | ||
991 | static int saa717x_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 991 | static int saa717x_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
992 | { | 992 | { |
993 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 993 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
994 | u16 addr = reg->reg & 0xffff; | 994 | u16 addr = reg->reg & 0xffff; |
diff --git a/drivers/media/i2c/soc_camera/mt9m001.c b/drivers/media/i2c/soc_camera/mt9m001.c index bcdc86175549..dd9089805757 100644 --- a/drivers/media/i2c/soc_camera/mt9m001.c +++ b/drivers/media/i2c/soc_camera/mt9m001.c | |||
@@ -360,7 +360,7 @@ static int mt9m001_g_register(struct v4l2_subdev *sd, | |||
360 | } | 360 | } |
361 | 361 | ||
362 | static int mt9m001_s_register(struct v4l2_subdev *sd, | 362 | static int mt9m001_s_register(struct v4l2_subdev *sd, |
363 | struct v4l2_dbg_register *reg) | 363 | const struct v4l2_dbg_register *reg) |
364 | { | 364 | { |
365 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 365 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
366 | 366 | ||
diff --git a/drivers/media/i2c/soc_camera/mt9m111.c b/drivers/media/i2c/soc_camera/mt9m111.c index 2902ba633da6..8bd4e0d2ea03 100644 --- a/drivers/media/i2c/soc_camera/mt9m111.c +++ b/drivers/media/i2c/soc_camera/mt9m111.c | |||
@@ -641,7 +641,7 @@ static int mt9m111_g_register(struct v4l2_subdev *sd, | |||
641 | } | 641 | } |
642 | 642 | ||
643 | static int mt9m111_s_register(struct v4l2_subdev *sd, | 643 | static int mt9m111_s_register(struct v4l2_subdev *sd, |
644 | struct v4l2_dbg_register *reg) | 644 | const struct v4l2_dbg_register *reg) |
645 | { | 645 | { |
646 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 646 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
647 | 647 | ||
diff --git a/drivers/media/i2c/soc_camera/mt9t031.c b/drivers/media/i2c/soc_camera/mt9t031.c index d80d044ebf15..26a15b87a9a2 100644 --- a/drivers/media/i2c/soc_camera/mt9t031.c +++ b/drivers/media/i2c/soc_camera/mt9t031.c | |||
@@ -430,7 +430,7 @@ static int mt9t031_g_register(struct v4l2_subdev *sd, | |||
430 | } | 430 | } |
431 | 431 | ||
432 | static int mt9t031_s_register(struct v4l2_subdev *sd, | 432 | static int mt9t031_s_register(struct v4l2_subdev *sd, |
433 | struct v4l2_dbg_register *reg) | 433 | const struct v4l2_dbg_register *reg) |
434 | { | 434 | { |
435 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 435 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
436 | 436 | ||
diff --git a/drivers/media/i2c/soc_camera/mt9t112.c b/drivers/media/i2c/soc_camera/mt9t112.c index 188e29b03273..a7256b732804 100644 --- a/drivers/media/i2c/soc_camera/mt9t112.c +++ b/drivers/media/i2c/soc_camera/mt9t112.c | |||
@@ -766,7 +766,7 @@ static int mt9t112_g_register(struct v4l2_subdev *sd, | |||
766 | } | 766 | } |
767 | 767 | ||
768 | static int mt9t112_s_register(struct v4l2_subdev *sd, | 768 | static int mt9t112_s_register(struct v4l2_subdev *sd, |
769 | struct v4l2_dbg_register *reg) | 769 | const struct v4l2_dbg_register *reg) |
770 | { | 770 | { |
771 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 771 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
772 | int ret; | 772 | int ret; |
diff --git a/drivers/media/i2c/soc_camera/mt9v022.c b/drivers/media/i2c/soc_camera/mt9v022.c index 53eaf899d3b6..a295e598486f 100644 --- a/drivers/media/i2c/soc_camera/mt9v022.c +++ b/drivers/media/i2c/soc_camera/mt9v022.c | |||
@@ -497,7 +497,7 @@ static int mt9v022_g_register(struct v4l2_subdev *sd, | |||
497 | } | 497 | } |
498 | 498 | ||
499 | static int mt9v022_s_register(struct v4l2_subdev *sd, | 499 | static int mt9v022_s_register(struct v4l2_subdev *sd, |
500 | struct v4l2_dbg_register *reg) | 500 | const struct v4l2_dbg_register *reg) |
501 | { | 501 | { |
502 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 502 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
503 | 503 | ||
diff --git a/drivers/media/i2c/soc_camera/ov2640.c b/drivers/media/i2c/soc_camera/ov2640.c index 0f520f693b6e..e3168424f9ba 100644 --- a/drivers/media/i2c/soc_camera/ov2640.c +++ b/drivers/media/i2c/soc_camera/ov2640.c | |||
@@ -756,7 +756,7 @@ static int ov2640_g_register(struct v4l2_subdev *sd, | |||
756 | } | 756 | } |
757 | 757 | ||
758 | static int ov2640_s_register(struct v4l2_subdev *sd, | 758 | static int ov2640_s_register(struct v4l2_subdev *sd, |
759 | struct v4l2_dbg_register *reg) | 759 | const struct v4l2_dbg_register *reg) |
760 | { | 760 | { |
761 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 761 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
762 | 762 | ||
diff --git a/drivers/media/i2c/soc_camera/ov5642.c b/drivers/media/i2c/soc_camera/ov5642.c index 9d53309619d2..9aa56de69eed 100644 --- a/drivers/media/i2c/soc_camera/ov5642.c +++ b/drivers/media/i2c/soc_camera/ov5642.c | |||
@@ -708,7 +708,7 @@ static int ov5642_get_register(struct v4l2_subdev *sd, struct v4l2_dbg_register | |||
708 | return ret; | 708 | return ret; |
709 | } | 709 | } |
710 | 710 | ||
711 | static int ov5642_set_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 711 | static int ov5642_set_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
712 | { | 712 | { |
713 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 713 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
714 | 714 | ||
diff --git a/drivers/media/i2c/soc_camera/ov6650.c b/drivers/media/i2c/soc_camera/ov6650.c index dbe4f564e6b2..991202d4bbae 100644 --- a/drivers/media/i2c/soc_camera/ov6650.c +++ b/drivers/media/i2c/soc_camera/ov6650.c | |||
@@ -421,7 +421,7 @@ static int ov6650_get_register(struct v4l2_subdev *sd, | |||
421 | } | 421 | } |
422 | 422 | ||
423 | static int ov6650_set_register(struct v4l2_subdev *sd, | 423 | static int ov6650_set_register(struct v4l2_subdev *sd, |
424 | struct v4l2_dbg_register *reg) | 424 | const struct v4l2_dbg_register *reg) |
425 | { | 425 | { |
426 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 426 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
427 | 427 | ||
diff --git a/drivers/media/i2c/soc_camera/ov772x.c b/drivers/media/i2c/soc_camera/ov772x.c index fbeb5b2f3ae5..713d62e349f6 100644 --- a/drivers/media/i2c/soc_camera/ov772x.c +++ b/drivers/media/i2c/soc_camera/ov772x.c | |||
@@ -652,7 +652,7 @@ static int ov772x_g_register(struct v4l2_subdev *sd, | |||
652 | } | 652 | } |
653 | 653 | ||
654 | static int ov772x_s_register(struct v4l2_subdev *sd, | 654 | static int ov772x_s_register(struct v4l2_subdev *sd, |
655 | struct v4l2_dbg_register *reg) | 655 | const struct v4l2_dbg_register *reg) |
656 | { | 656 | { |
657 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 657 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
658 | 658 | ||
diff --git a/drivers/media/i2c/soc_camera/ov9640.c b/drivers/media/i2c/soc_camera/ov9640.c index 05993041be31..20ca62d371c1 100644 --- a/drivers/media/i2c/soc_camera/ov9640.c +++ b/drivers/media/i2c/soc_camera/ov9640.c | |||
@@ -322,7 +322,7 @@ static int ov9640_get_register(struct v4l2_subdev *sd, | |||
322 | } | 322 | } |
323 | 323 | ||
324 | static int ov9640_set_register(struct v4l2_subdev *sd, | 324 | static int ov9640_set_register(struct v4l2_subdev *sd, |
325 | struct v4l2_dbg_register *reg) | 325 | const struct v4l2_dbg_register *reg) |
326 | { | 326 | { |
327 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 327 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
328 | 328 | ||
diff --git a/drivers/media/i2c/soc_camera/ov9740.c b/drivers/media/i2c/soc_camera/ov9740.c index 2f236da80165..012bd6271124 100644 --- a/drivers/media/i2c/soc_camera/ov9740.c +++ b/drivers/media/i2c/soc_camera/ov9740.c | |||
@@ -835,7 +835,7 @@ static int ov9740_get_register(struct v4l2_subdev *sd, | |||
835 | } | 835 | } |
836 | 836 | ||
837 | static int ov9740_set_register(struct v4l2_subdev *sd, | 837 | static int ov9740_set_register(struct v4l2_subdev *sd, |
838 | struct v4l2_dbg_register *reg) | 838 | const struct v4l2_dbg_register *reg) |
839 | { | 839 | { |
840 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 840 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
841 | 841 | ||
diff --git a/drivers/media/i2c/soc_camera/rj54n1cb0c.c b/drivers/media/i2c/soc_camera/rj54n1cb0c.c index 5c92679bfefb..1f9ec3b06b4e 100644 --- a/drivers/media/i2c/soc_camera/rj54n1cb0c.c +++ b/drivers/media/i2c/soc_camera/rj54n1cb0c.c | |||
@@ -1161,7 +1161,7 @@ static int rj54n1_g_register(struct v4l2_subdev *sd, | |||
1161 | } | 1161 | } |
1162 | 1162 | ||
1163 | static int rj54n1_s_register(struct v4l2_subdev *sd, | 1163 | static int rj54n1_s_register(struct v4l2_subdev *sd, |
1164 | struct v4l2_dbg_register *reg) | 1164 | const struct v4l2_dbg_register *reg) |
1165 | { | 1165 | { |
1166 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 1166 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
1167 | 1167 | ||
diff --git a/drivers/media/i2c/soc_camera/tw9910.c b/drivers/media/i2c/soc_camera/tw9910.c index 7d2074601881..bad90b16a6dd 100644 --- a/drivers/media/i2c/soc_camera/tw9910.c +++ b/drivers/media/i2c/soc_camera/tw9910.c | |||
@@ -554,7 +554,7 @@ static int tw9910_g_register(struct v4l2_subdev *sd, | |||
554 | } | 554 | } |
555 | 555 | ||
556 | static int tw9910_s_register(struct v4l2_subdev *sd, | 556 | static int tw9910_s_register(struct v4l2_subdev *sd, |
557 | struct v4l2_dbg_register *reg) | 557 | const struct v4l2_dbg_register *reg) |
558 | { | 558 | { |
559 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 559 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
560 | 560 | ||
diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c index 3ca60c7cd95f..c4339556a2ea 100644 --- a/drivers/media/i2c/ths7303.c +++ b/drivers/media/i2c/ths7303.c | |||
@@ -245,7 +245,7 @@ static int ths7303_g_register(struct v4l2_subdev *sd, | |||
245 | } | 245 | } |
246 | 246 | ||
247 | static int ths7303_s_register(struct v4l2_subdev *sd, | 247 | static int ths7303_s_register(struct v4l2_subdev *sd, |
248 | struct v4l2_dbg_register *reg) | 248 | const struct v4l2_dbg_register *reg) |
249 | { | 249 | { |
250 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 250 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
251 | 251 | ||
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 5967e1a0c809..485159a3c0b7 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c | |||
@@ -1067,7 +1067,7 @@ static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register * | |||
1067 | return 0; | 1067 | return 0; |
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | static int tvp5150_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 1070 | static int tvp5150_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
1071 | { | 1071 | { |
1072 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 1072 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
1073 | 1073 | ||
diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 7406de9b45db..027809cca5f5 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c | |||
@@ -768,7 +768,7 @@ static int tvp7002_g_register(struct v4l2_subdev *sd, | |||
768 | * -EPERM if call not allowed. | 768 | * -EPERM if call not allowed. |
769 | */ | 769 | */ |
770 | static int tvp7002_s_register(struct v4l2_subdev *sd, | 770 | static int tvp7002_s_register(struct v4l2_subdev *sd, |
771 | struct v4l2_dbg_register *reg) | 771 | const struct v4l2_dbg_register *reg) |
772 | { | 772 | { |
773 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 773 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
774 | 774 | ||
diff --git a/drivers/media/i2c/upd64031a.c b/drivers/media/i2c/upd64031a.c index d15cfd944e57..f0a09214c519 100644 --- a/drivers/media/i2c/upd64031a.c +++ b/drivers/media/i2c/upd64031a.c | |||
@@ -175,7 +175,7 @@ static int upd64031a_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static int upd64031a_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 178 | static int upd64031a_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
179 | { | 179 | { |
180 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 180 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
181 | 181 | ||
diff --git a/drivers/media/i2c/upd64083.c b/drivers/media/i2c/upd64083.c index 75d6acc62018..343e0215f74c 100644 --- a/drivers/media/i2c/upd64083.c +++ b/drivers/media/i2c/upd64083.c | |||
@@ -133,7 +133,7 @@ static int upd64083_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register | |||
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
136 | static int upd64083_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 136 | static int upd64083_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
137 | { | 137 | { |
138 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 138 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
139 | 139 | ||
diff --git a/drivers/media/i2c/vs6624.c b/drivers/media/i2c/vs6624.c index 9ac1b8c3a837..f366fad6269e 100644 --- a/drivers/media/i2c/vs6624.c +++ b/drivers/media/i2c/vs6624.c | |||
@@ -748,7 +748,7 @@ static int vs6624_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *r | |||
748 | return 0; | 748 | return 0; |
749 | } | 749 | } |
750 | 750 | ||
751 | static int vs6624_s_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) | 751 | static int vs6624_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) |
752 | { | 752 | { |
753 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 753 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
754 | 754 | ||
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 4b9a256f506e..e33a2d2f81a8 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
@@ -1945,7 +1945,7 @@ static int bttv_g_register(struct file *file, void *f, | |||
1945 | } | 1945 | } |
1946 | 1946 | ||
1947 | static int bttv_s_register(struct file *file, void *f, | 1947 | static int bttv_s_register(struct file *file, void *f, |
1948 | struct v4l2_dbg_register *reg) | 1948 | const struct v4l2_dbg_register *reg) |
1949 | { | 1949 | { |
1950 | struct bttv_fh *fh = f; | 1950 | struct bttv_fh *fh = f; |
1951 | struct bttv *btv = fh->btv; | 1951 | struct bttv *btv = fh->btv; |
@@ -1961,8 +1961,7 @@ static int bttv_s_register(struct file *file, void *f, | |||
1961 | } | 1961 | } |
1962 | 1962 | ||
1963 | /* bt848 has a 12-bit register space */ | 1963 | /* bt848 has a 12-bit register space */ |
1964 | reg->reg &= 0xfff; | 1964 | btwrite(reg->val, reg->reg & 0xfff); |
1965 | btwrite(reg->val, reg->reg); | ||
1966 | 1965 | ||
1967 | return 0; | 1966 | return 0; |
1968 | } | 1967 | } |
diff --git a/drivers/media/pci/cx18/cx18-av-core.c b/drivers/media/pci/cx18/cx18-av-core.c index c22242bc10df..38b1d64ffc27 100644 --- a/drivers/media/pci/cx18/cx18-av-core.c +++ b/drivers/media/pci/cx18/cx18-av-core.c | |||
@@ -1266,7 +1266,7 @@ static int cx18_av_g_register(struct v4l2_subdev *sd, | |||
1266 | } | 1266 | } |
1267 | 1267 | ||
1268 | static int cx18_av_s_register(struct v4l2_subdev *sd, | 1268 | static int cx18_av_s_register(struct v4l2_subdev *sd, |
1269 | struct v4l2_dbg_register *reg) | 1269 | const struct v4l2_dbg_register *reg) |
1270 | { | 1270 | { |
1271 | struct cx18 *cx = v4l2_get_subdevdata(sd); | 1271 | struct cx18 *cx = v4l2_get_subdevdata(sd); |
1272 | 1272 | ||
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c index 254c50fabd73..7dbd5a9451ed 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.c +++ b/drivers/media/pci/cx18/cx18-ioctl.c | |||
@@ -415,42 +415,34 @@ static int cx18_g_chip_ident(struct file *file, void *fh, | |||
415 | } | 415 | } |
416 | 416 | ||
417 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 417 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
418 | static int cx18_cxc(struct cx18 *cx, unsigned int cmd, void *arg) | ||
419 | { | ||
420 | struct v4l2_dbg_register *regs = arg; | ||
421 | |||
422 | if (!capable(CAP_SYS_ADMIN)) | ||
423 | return -EPERM; | ||
424 | if (regs->reg >= CX18_MEM_OFFSET + CX18_MEM_SIZE) | ||
425 | return -EINVAL; | ||
426 | |||
427 | regs->size = 4; | ||
428 | if (cmd == VIDIOC_DBG_S_REGISTER) | ||
429 | cx18_write_enc(cx, regs->val, regs->reg); | ||
430 | else | ||
431 | regs->val = cx18_read_enc(cx, regs->reg); | ||
432 | return 0; | ||
433 | } | ||
434 | |||
435 | static int cx18_g_register(struct file *file, void *fh, | 418 | static int cx18_g_register(struct file *file, void *fh, |
436 | struct v4l2_dbg_register *reg) | 419 | struct v4l2_dbg_register *reg) |
437 | { | 420 | { |
438 | struct cx18 *cx = fh2id(fh)->cx; | 421 | struct cx18 *cx = fh2id(fh)->cx; |
439 | 422 | ||
440 | if (v4l2_chip_match_host(®->match)) | 423 | if (v4l2_chip_match_host(®->match)) { |
441 | return cx18_cxc(cx, VIDIOC_DBG_G_REGISTER, reg); | 424 | if (reg->reg >= CX18_MEM_OFFSET + CX18_MEM_SIZE) |
425 | return -EINVAL; | ||
426 | reg->size = 4; | ||
427 | reg->val = cx18_read_enc(cx, reg->reg); | ||
428 | return 0; | ||
429 | } | ||
442 | /* FIXME - errors shouldn't be ignored */ | 430 | /* FIXME - errors shouldn't be ignored */ |
443 | cx18_call_all(cx, core, g_register, reg); | 431 | cx18_call_all(cx, core, g_register, reg); |
444 | return 0; | 432 | return 0; |
445 | } | 433 | } |
446 | 434 | ||
447 | static int cx18_s_register(struct file *file, void *fh, | 435 | static int cx18_s_register(struct file *file, void *fh, |
448 | struct v4l2_dbg_register *reg) | 436 | const struct v4l2_dbg_register *reg) |
449 | { | 437 | { |
450 | struct cx18 *cx = fh2id(fh)->cx; | 438 | struct cx18 *cx = fh2id(fh)->cx; |
451 | 439 | ||
452 | if (v4l2_chip_match_host(®->match)) | 440 | if (v4l2_chip_match_host(®->match)) { |
453 | return cx18_cxc(cx, VIDIOC_DBG_S_REGISTER, reg); | 441 | if (reg->reg >= CX18_MEM_OFFSET + CX18_MEM_SIZE) |
442 | return -EINVAL; | ||
443 | cx18_write_enc(cx, reg->val, reg->reg); | ||
444 | return 0; | ||
445 | } | ||
454 | /* FIXME - errors shouldn't be ignored */ | 446 | /* FIXME - errors shouldn't be ignored */ |
455 | cx18_call_all(cx, core, s_register, reg); | 447 | cx18_call_all(cx, core, s_register, reg); |
456 | return 0; | 448 | return 0; |
diff --git a/drivers/media/pci/cx23885/cx23885-ioctl.c b/drivers/media/pci/cx23885/cx23885-ioctl.c index ea9a614f3bbf..acdb6d58db58 100644 --- a/drivers/media/pci/cx23885/cx23885-ioctl.c +++ b/drivers/media/pci/cx23885/cx23885-ioctl.c | |||
@@ -158,18 +158,17 @@ int cx23885_g_register(struct file *file, void *fh, | |||
158 | } | 158 | } |
159 | 159 | ||
160 | static int cx23885_s_host_register(struct cx23885_dev *dev, | 160 | static int cx23885_s_host_register(struct cx23885_dev *dev, |
161 | struct v4l2_dbg_register *reg) | 161 | const struct v4l2_dbg_register *reg) |
162 | { | 162 | { |
163 | if ((reg->reg & 0x3) != 0 || reg->reg >= pci_resource_len(dev->pci, 0)) | 163 | if ((reg->reg & 0x3) != 0 || reg->reg >= pci_resource_len(dev->pci, 0)) |
164 | return -EINVAL; | 164 | return -EINVAL; |
165 | 165 | ||
166 | reg->size = 4; | ||
167 | cx_write(reg->reg, reg->val); | 166 | cx_write(reg->reg, reg->val); |
168 | return 0; | 167 | return 0; |
169 | } | 168 | } |
170 | 169 | ||
171 | static int cx23417_s_register(struct cx23885_dev *dev, | 170 | static int cx23417_s_register(struct cx23885_dev *dev, |
172 | struct v4l2_dbg_register *reg) | 171 | const struct v4l2_dbg_register *reg) |
173 | { | 172 | { |
174 | if (dev->v4l_device == NULL) | 173 | if (dev->v4l_device == NULL) |
175 | return -EINVAL; | 174 | return -EINVAL; |
@@ -179,13 +178,11 @@ static int cx23417_s_register(struct cx23885_dev *dev, | |||
179 | 178 | ||
180 | if (mc417_register_write(dev, (u16) reg->reg, (u32) reg->val)) | 179 | if (mc417_register_write(dev, (u16) reg->reg, (u32) reg->val)) |
181 | return -EINVAL; /* V4L2 spec, but -EREMOTEIO really */ | 180 | return -EINVAL; /* V4L2 spec, but -EREMOTEIO really */ |
182 | |||
183 | reg->size = 4; | ||
184 | return 0; | 181 | return 0; |
185 | } | 182 | } |
186 | 183 | ||
187 | int cx23885_s_register(struct file *file, void *fh, | 184 | int cx23885_s_register(struct file *file, void *fh, |
188 | struct v4l2_dbg_register *reg) | 185 | const struct v4l2_dbg_register *reg) |
189 | { | 186 | { |
190 | struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; | 187 | struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; |
191 | 188 | ||
diff --git a/drivers/media/pci/cx23885/cx23885-ioctl.h b/drivers/media/pci/cx23885/cx23885-ioctl.h index 315be0ca5a04..a6080964a9ee 100644 --- a/drivers/media/pci/cx23885/cx23885-ioctl.h +++ b/drivers/media/pci/cx23885/cx23885-ioctl.h | |||
@@ -33,7 +33,7 @@ int cx23885_g_register(struct file *file, void *fh, | |||
33 | 33 | ||
34 | 34 | ||
35 | int cx23885_s_register(struct file *file, void *fh, | 35 | int cx23885_s_register(struct file *file, void *fh, |
36 | struct v4l2_dbg_register *reg); | 36 | const struct v4l2_dbg_register *reg); |
37 | 37 | ||
38 | #endif | 38 | #endif |
39 | #endif | 39 | #endif |
diff --git a/drivers/media/pci/cx23885/cx23888-ir.c b/drivers/media/pci/cx23885/cx23888-ir.c index d51eed051d59..fa672fe41079 100644 --- a/drivers/media/pci/cx23885/cx23888-ir.c +++ b/drivers/media/pci/cx23885/cx23888-ir.c | |||
@@ -1124,7 +1124,7 @@ static int cx23888_ir_g_register(struct v4l2_subdev *sd, | |||
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | static int cx23888_ir_s_register(struct v4l2_subdev *sd, | 1126 | static int cx23888_ir_s_register(struct v4l2_subdev *sd, |
1127 | struct v4l2_dbg_register *reg) | 1127 | const struct v4l2_dbg_register *reg) |
1128 | { | 1128 | { |
1129 | struct cx23888_ir_state *state = to_state(sd); | 1129 | struct cx23888_ir_state *state = to_state(sd); |
1130 | u32 addr = CX23888_IR_REG_BASE + (u32) reg->reg; | 1130 | u32 addr = CX23888_IR_REG_BASE + (u32) reg->reg; |
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 93c7d576199b..1465591d000c 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c | |||
@@ -1364,7 +1364,7 @@ int cx25821_vidioc_g_register(struct file *file, void *fh, | |||
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | int cx25821_vidioc_s_register(struct file *file, void *fh, | 1366 | int cx25821_vidioc_s_register(struct file *file, void *fh, |
1367 | struct v4l2_dbg_register *reg) | 1367 | const struct v4l2_dbg_register *reg) |
1368 | { | 1368 | { |
1369 | struct cx25821_dev *dev = ((struct cx25821_fh *)fh)->dev; | 1369 | struct cx25821_dev *dev = ((struct cx25821_fh *)fh)->dev; |
1370 | 1370 | ||
diff --git a/drivers/media/pci/cx25821/cx25821-video.h b/drivers/media/pci/cx25821/cx25821-video.h index 239f63c12f33..11ba5eb93677 100644 --- a/drivers/media/pci/cx25821/cx25821-video.h +++ b/drivers/media/pci/cx25821/cx25821-video.h | |||
@@ -155,7 +155,7 @@ extern int cx25821_vidioc_s_frequency(struct file *file, void *priv, | |||
155 | extern int cx25821_vidioc_g_register(struct file *file, void *fh, | 155 | extern int cx25821_vidioc_g_register(struct file *file, void *fh, |
156 | struct v4l2_dbg_register *reg); | 156 | struct v4l2_dbg_register *reg); |
157 | extern int cx25821_vidioc_s_register(struct file *file, void *fh, | 157 | extern int cx25821_vidioc_s_register(struct file *file, void *fh, |
158 | struct v4l2_dbg_register *reg); | 158 | const struct v4l2_dbg_register *reg); |
159 | extern int cx25821_vidioc_g_tuner(struct file *file, void *priv, | 159 | extern int cx25821_vidioc_g_tuner(struct file *file, void *priv, |
160 | struct v4l2_tuner *t); | 160 | struct v4l2_tuner *t); |
161 | extern int cx25821_vidioc_s_tuner(struct file *file, void *priv, | 161 | extern int cx25821_vidioc_s_tuner(struct file *file, void *priv, |
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index ead5be58303d..e3f6181d1044 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c | |||
@@ -1380,7 +1380,7 @@ static int vidioc_g_register (struct file *file, void *fh, | |||
1380 | } | 1380 | } |
1381 | 1381 | ||
1382 | static int vidioc_s_register (struct file *file, void *fh, | 1382 | static int vidioc_s_register (struct file *file, void *fh, |
1383 | struct v4l2_dbg_register *reg) | 1383 | const struct v4l2_dbg_register *reg) |
1384 | { | 1384 | { |
1385 | struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; | 1385 | struct cx88_core *core = ((struct cx8800_fh*)fh)->dev->core; |
1386 | 1386 | ||
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 861e4629c7fc..50379b26768b 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c | |||
@@ -748,12 +748,15 @@ static int ivtv_g_register(struct file *file, void *fh, struct v4l2_dbg_register | |||
748 | return 0; | 748 | return 0; |
749 | } | 749 | } |
750 | 750 | ||
751 | static int ivtv_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg) | 751 | static int ivtv_s_register(struct file *file, void *fh, const struct v4l2_dbg_register *reg) |
752 | { | 752 | { |
753 | struct ivtv *itv = fh2id(fh)->itv; | 753 | struct ivtv *itv = fh2id(fh)->itv; |
754 | 754 | ||
755 | if (v4l2_chip_match_host(®->match)) | 755 | if (v4l2_chip_match_host(®->match)) { |
756 | return ivtv_itvc(itv, false, reg->reg, ®->val); | 756 | u64 val = reg->val; |
757 | |||
758 | return ivtv_itvc(itv, false, reg->reg, &val); | ||
759 | } | ||
757 | /* TODO: subdev errors should not be ignored, this should become a | 760 | /* TODO: subdev errors should not be ignored, this should become a |
758 | subdev helper function. */ | 761 | subdev helper function. */ |
759 | ivtv_call_all(itv, core, s_register, reg); | 762 | ivtv_call_all(itv, core, s_register, reg); |
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index a6c69a4c7fbd..1363e97ccda4 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c | |||
@@ -2300,7 +2300,7 @@ static int vidioc_g_register (struct file *file, void *priv, | |||
2300 | } | 2300 | } |
2301 | 2301 | ||
2302 | static int vidioc_s_register (struct file *file, void *priv, | 2302 | static int vidioc_s_register (struct file *file, void *priv, |
2303 | struct v4l2_dbg_register *reg) | 2303 | const struct v4l2_dbg_register *reg) |
2304 | { | 2304 | { |
2305 | struct saa7134_fh *fh = priv; | 2305 | struct saa7134_fh *fh = priv; |
2306 | struct saa7134_dev *dev = fh->dev; | 2306 | struct saa7134_dev *dev = fh->dev; |
diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c index 9dd044b563e7..71e8bead321b 100644 --- a/drivers/media/pci/saa7146/mxb.c +++ b/drivers/media/pci/saa7146/mxb.c | |||
@@ -680,7 +680,7 @@ static int vidioc_g_register(struct file *file, void *fh, struct v4l2_dbg_regist | |||
680 | return 0; | 680 | return 0; |
681 | } | 681 | } |
682 | 682 | ||
683 | static int vidioc_s_register(struct file *file, void *fh, struct v4l2_dbg_register *reg) | 683 | static int vidioc_s_register(struct file *file, void *fh, const struct v4l2_dbg_register *reg) |
684 | { | 684 | { |
685 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 685 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
686 | 686 | ||
@@ -688,7 +688,6 @@ static int vidioc_s_register(struct file *file, void *fh, struct v4l2_dbg_regist | |||
688 | return -EPERM; | 688 | return -EPERM; |
689 | if (v4l2_chip_match_host(®->match)) { | 689 | if (v4l2_chip_match_host(®->match)) { |
690 | saa7146_write(dev, reg->reg, reg->val); | 690 | saa7146_write(dev, reg->reg, reg->val); |
691 | reg->size = 4; | ||
692 | return 0; | 691 | return 0; |
693 | } | 692 | } |
694 | return call_all(dev, core, s_register, reg); | 693 | return call_all(dev, core, s_register, reg); |
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index 538de52b9cfd..0b74fb2300dd 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c | |||
@@ -1313,7 +1313,7 @@ static int saa7164_g_register(struct file *file, void *fh, | |||
1313 | } | 1313 | } |
1314 | 1314 | ||
1315 | static int saa7164_s_register(struct file *file, void *fh, | 1315 | static int saa7164_s_register(struct file *file, void *fh, |
1316 | struct v4l2_dbg_register *reg) | 1316 | const struct v4l2_dbg_register *reg) |
1317 | { | 1317 | { |
1318 | struct saa7164_port *port = ((struct saa7164_encoder_fh *)fh)->port; | 1318 | struct saa7164_port *port = ((struct saa7164_encoder_fh *)fh)->port; |
1319 | struct saa7164_dev *dev = port->dev; | 1319 | struct saa7164_dev *dev = port->dev; |
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index 96f6a4922d0c..0e55b087076f 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c | |||
@@ -890,7 +890,7 @@ static int bcap_dbg_g_register(struct file *file, void *priv, | |||
890 | } | 890 | } |
891 | 891 | ||
892 | static int bcap_dbg_s_register(struct file *file, void *priv, | 892 | static int bcap_dbg_s_register(struct file *file, void *priv, |
893 | struct v4l2_dbg_register *reg) | 893 | const struct v4l2_dbg_register *reg) |
894 | { | 894 | { |
895 | struct bcap_device *bcap_dev = video_drvdata(file); | 895 | struct bcap_device *bcap_dev = video_drvdata(file); |
896 | 896 | ||
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index bcf0ada3481d..1802f11e939f 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c | |||
@@ -1597,7 +1597,7 @@ static int vpbe_display_g_register(struct file *file, void *priv, | |||
1597 | } | 1597 | } |
1598 | 1598 | ||
1599 | static int vpbe_display_s_register(struct file *file, void *priv, | 1599 | static int vpbe_display_s_register(struct file *file, void *priv, |
1600 | struct v4l2_dbg_register *reg) | 1600 | const struct v4l2_dbg_register *reg) |
1601 | { | 1601 | { |
1602 | return 0; | 1602 | return 0; |
1603 | } | 1603 | } |
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 00b7f9c5ac04..5f98df1fc8a0 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c | |||
@@ -1924,7 +1924,8 @@ static int vpif_dbg_g_register(struct file *file, void *priv, | |||
1924 | * Returns zero or -EINVAL if write operations fails. | 1924 | * Returns zero or -EINVAL if write operations fails. |
1925 | */ | 1925 | */ |
1926 | static int vpif_dbg_s_register(struct file *file, void *priv, | 1926 | static int vpif_dbg_s_register(struct file *file, void *priv, |
1927 | struct v4l2_dbg_register *reg){ | 1927 | const struct v4l2_dbg_register *reg) |
1928 | { | ||
1928 | struct vpif_fh *fh = priv; | 1929 | struct vpif_fh *fh = priv; |
1929 | struct channel_obj *ch = fh->channel; | 1930 | struct channel_obj *ch = fh->channel; |
1930 | 1931 | ||
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index f1dff9ec1ea2..1b3fb5ca2ad4 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c | |||
@@ -1568,7 +1568,8 @@ static int vpif_dbg_g_register(struct file *file, void *priv, | |||
1568 | * Returns zero or -EINVAL if write operations fails. | 1568 | * Returns zero or -EINVAL if write operations fails. |
1569 | */ | 1569 | */ |
1570 | static int vpif_dbg_s_register(struct file *file, void *priv, | 1570 | static int vpif_dbg_s_register(struct file *file, void *priv, |
1571 | struct v4l2_dbg_register *reg){ | 1571 | const struct v4l2_dbg_register *reg) |
1572 | { | ||
1572 | struct vpif_fh *fh = priv; | 1573 | struct vpif_fh *fh = priv; |
1573 | struct channel_obj *ch = fh->channel; | 1574 | struct channel_obj *ch = fh->channel; |
1574 | 1575 | ||
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c index 76a862318a7e..64ab91edfb81 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.c +++ b/drivers/media/platform/marvell-ccic/mcam-core.c | |||
@@ -1445,7 +1445,7 @@ static int mcam_vidioc_g_register(struct file *file, void *priv, | |||
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | static int mcam_vidioc_s_register(struct file *file, void *priv, | 1447 | static int mcam_vidioc_s_register(struct file *file, void *priv, |
1448 | struct v4l2_dbg_register *reg) | 1448 | const struct v4l2_dbg_register *reg) |
1449 | { | 1449 | { |
1450 | struct mcam_camera *cam = priv; | 1450 | struct mcam_camera *cam = priv; |
1451 | 1451 | ||
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 8e3b95a6c29e..7d0235069c87 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c | |||
@@ -1266,7 +1266,7 @@ static int sh_vou_g_register(struct file *file, void *fh, | |||
1266 | } | 1266 | } |
1267 | 1267 | ||
1268 | static int sh_vou_s_register(struct file *file, void *fh, | 1268 | static int sh_vou_s_register(struct file *file, void *fh, |
1269 | struct v4l2_dbg_register *reg) | 1269 | const struct v4l2_dbg_register *reg) |
1270 | { | 1270 | { |
1271 | struct sh_vou_device *vou_dev = video_drvdata(file); | 1271 | struct sh_vou_device *vou_dev = video_drvdata(file); |
1272 | 1272 | ||
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 3592968026cd..bf55abfb7cbc 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
@@ -1042,7 +1042,7 @@ static int soc_camera_g_register(struct file *file, void *fh, | |||
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | static int soc_camera_s_register(struct file *file, void *fh, | 1044 | static int soc_camera_s_register(struct file *file, void *fh, |
1045 | struct v4l2_dbg_register *reg) | 1045 | const struct v4l2_dbg_register *reg) |
1046 | { | 1046 | { |
1047 | struct soc_camera_device *icd = file->private_data; | 1047 | struct soc_camera_device *icd = file->private_data; |
1048 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | 1048 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index e9dd01c4b6ed..79f1d510cc2e 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c | |||
@@ -1754,7 +1754,7 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | static int vidioc_s_register(struct file *file, void *priv, | 1756 | static int vidioc_s_register(struct file *file, void *priv, |
1757 | struct v4l2_dbg_register *reg) | 1757 | const struct v4l2_dbg_register *reg) |
1758 | { | 1758 | { |
1759 | struct au0828_fh *fh = priv; | 1759 | struct au0828_fh *fh = priv; |
1760 | struct au0828_dev *dev = fh->dev; | 1760 | struct au0828_dev *dev = fh->dev; |
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 4cff2f4075e1..cd221474e1b9 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c | |||
@@ -1404,7 +1404,7 @@ int cx231xx_g_register(struct file *file, void *priv, | |||
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | int cx231xx_s_register(struct file *file, void *priv, | 1406 | int cx231xx_s_register(struct file *file, void *priv, |
1407 | struct v4l2_dbg_register *reg) | 1407 | const struct v4l2_dbg_register *reg) |
1408 | { | 1408 | { |
1409 | struct cx231xx_fh *fh = priv; | 1409 | struct cx231xx_fh *fh = priv; |
1410 | struct cx231xx *dev = fh->dev; | 1410 | struct cx231xx *dev = fh->dev; |
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index 2f9faee539cb..5ad9fd61d3c8 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h | |||
@@ -949,7 +949,7 @@ int cx231xx_g_chip_ident(struct file *file, void *fh, struct v4l2_dbg_chip_ident | |||
949 | int cx231xx_g_register(struct file *file, void *priv, | 949 | int cx231xx_g_register(struct file *file, void *priv, |
950 | struct v4l2_dbg_register *reg); | 950 | struct v4l2_dbg_register *reg); |
951 | int cx231xx_s_register(struct file *file, void *priv, | 951 | int cx231xx_s_register(struct file *file, void *priv, |
952 | struct v4l2_dbg_register *reg); | 952 | const struct v4l2_dbg_register *reg); |
953 | 953 | ||
954 | /* Provided by cx231xx-cards.c */ | 954 | /* Provided by cx231xx-cards.c */ |
955 | extern void cx231xx_pre_card_setup(struct cx231xx *dev); | 955 | extern void cx231xx_pre_card_setup(struct cx231xx *dev); |
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 96d84c22ef00..d09b5c03c723 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c | |||
@@ -1323,7 +1323,7 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
1323 | } | 1323 | } |
1324 | 1324 | ||
1325 | static int vidioc_s_register(struct file *file, void *priv, | 1325 | static int vidioc_s_register(struct file *file, void *priv, |
1326 | struct v4l2_dbg_register *reg) | 1326 | const struct v4l2_dbg_register *reg) |
1327 | { | 1327 | { |
1328 | struct em28xx_fh *fh = priv; | 1328 | struct em28xx_fh *fh = priv; |
1329 | struct em28xx *dev = fh->dev; | 1329 | struct em28xx *dev = fh->dev; |
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index 924e032461d0..5995ec4de6bc 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c | |||
@@ -1039,7 +1039,7 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | static int vidioc_s_register(struct file *file, void *priv, | 1041 | static int vidioc_s_register(struct file *file, void *priv, |
1042 | struct v4l2_dbg_register *reg) | 1042 | const struct v4l2_dbg_register *reg) |
1043 | { | 1043 | { |
1044 | struct gspca_dev *gspca_dev = video_drvdata(file); | 1044 | struct gspca_dev *gspca_dev = video_drvdata(file); |
1045 | 1045 | ||
diff --git a/drivers/media/usb/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h index c3af3212d51e..ef8efeb80070 100644 --- a/drivers/media/usb/gspca/gspca.h +++ b/drivers/media/usb/gspca/gspca.h | |||
@@ -74,8 +74,10 @@ typedef int (*cam_get_jpg_op) (struct gspca_dev *, | |||
74 | struct v4l2_jpegcompression *); | 74 | struct v4l2_jpegcompression *); |
75 | typedef int (*cam_set_jpg_op) (struct gspca_dev *, | 75 | typedef int (*cam_set_jpg_op) (struct gspca_dev *, |
76 | const struct v4l2_jpegcompression *); | 76 | const struct v4l2_jpegcompression *); |
77 | typedef int (*cam_reg_op) (struct gspca_dev *, | 77 | typedef int (*cam_get_reg_op) (struct gspca_dev *, |
78 | struct v4l2_dbg_register *); | 78 | struct v4l2_dbg_register *); |
79 | typedef int (*cam_set_reg_op) (struct gspca_dev *, | ||
80 | const struct v4l2_dbg_register *); | ||
79 | typedef int (*cam_ident_op) (struct gspca_dev *, | 81 | typedef int (*cam_ident_op) (struct gspca_dev *, |
80 | struct v4l2_dbg_chip_ident *); | 82 | struct v4l2_dbg_chip_ident *); |
81 | typedef void (*cam_streamparm_op) (struct gspca_dev *, | 83 | typedef void (*cam_streamparm_op) (struct gspca_dev *, |
@@ -108,8 +110,8 @@ struct sd_desc { | |||
108 | cam_streamparm_op get_streamparm; | 110 | cam_streamparm_op get_streamparm; |
109 | cam_streamparm_op set_streamparm; | 111 | cam_streamparm_op set_streamparm; |
110 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 112 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
111 | cam_reg_op set_register; | 113 | cam_set_reg_op set_register; |
112 | cam_reg_op get_register; | 114 | cam_get_reg_op get_register; |
113 | #endif | 115 | #endif |
114 | cam_ident_op get_chip_ident; | 116 | cam_ident_op get_chip_ident; |
115 | #if IS_ENABLED(CONFIG_INPUT) | 117 | #if IS_ENABLED(CONFIG_INPUT) |
diff --git a/drivers/media/usb/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c index 682ef3340911..6008c8d546a3 100644 --- a/drivers/media/usb/gspca/pac7302.c +++ b/drivers/media/usb/gspca/pac7302.c | |||
@@ -840,7 +840,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
840 | 840 | ||
841 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 841 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
842 | static int sd_dbg_s_register(struct gspca_dev *gspca_dev, | 842 | static int sd_dbg_s_register(struct gspca_dev *gspca_dev, |
843 | struct v4l2_dbg_register *reg) | 843 | const struct v4l2_dbg_register *reg) |
844 | { | 844 | { |
845 | u8 index; | 845 | u8 index; |
846 | u8 value; | 846 | u8 value; |
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 4ec544f4a845..ead9a1f58513 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers/media/usb/gspca/sn9c20x.c | |||
@@ -1598,7 +1598,7 @@ static int sd_dbg_g_register(struct gspca_dev *gspca_dev, | |||
1598 | } | 1598 | } |
1599 | 1599 | ||
1600 | static int sd_dbg_s_register(struct gspca_dev *gspca_dev, | 1600 | static int sd_dbg_s_register(struct gspca_dev *gspca_dev, |
1601 | struct v4l2_dbg_register *reg) | 1601 | const struct v4l2_dbg_register *reg) |
1602 | { | 1602 | { |
1603 | struct sd *sd = (struct sd *) gspca_dev; | 1603 | struct sd *sd = (struct sd *) gspca_dev; |
1604 | 1604 | ||
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index 299751a8b06b..e11267f35d87 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c | |||
@@ -5165,7 +5165,7 @@ static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw) | |||
5165 | 5165 | ||
5166 | 5166 | ||
5167 | int pvr2_hdw_register_access(struct pvr2_hdw *hdw, | 5167 | int pvr2_hdw_register_access(struct pvr2_hdw *hdw, |
5168 | struct v4l2_dbg_match *match, u64 reg_id, | 5168 | const struct v4l2_dbg_match *match, u64 reg_id, |
5169 | int setFl, u64 *val_ptr) | 5169 | int setFl, u64 *val_ptr) |
5170 | { | 5170 | { |
5171 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 5171 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.h b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h index 8060fc666eeb..91bae930cd79 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.h | |||
@@ -240,7 +240,7 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *, | |||
240 | setFl - true to set the register, false to read it | 240 | setFl - true to set the register, false to read it |
241 | val_ptr - storage location for source / result. */ | 241 | val_ptr - storage location for source / result. */ |
242 | int pvr2_hdw_register_access(struct pvr2_hdw *, | 242 | int pvr2_hdw_register_access(struct pvr2_hdw *, |
243 | struct v4l2_dbg_match *match, u64 reg_id, | 243 | const struct v4l2_dbg_match *match, u64 reg_id, |
244 | int setFl, u64 *val_ptr); | 244 | int setFl, u64 *val_ptr); |
245 | 245 | ||
246 | /* The following entry points are all lower level things you normally don't | 246 | /* The following entry points are all lower level things you normally don't |
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index a7774e3836d4..a8a65fa57930 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | |||
@@ -815,7 +815,7 @@ static int pvr2_g_register(struct file *file, void *priv, struct v4l2_dbg_regist | |||
815 | return ret; | 815 | return ret; |
816 | } | 816 | } |
817 | 817 | ||
818 | static int pvr2_s_register(struct file *file, void *priv, struct v4l2_dbg_register *req) | 818 | static int pvr2_s_register(struct file *file, void *priv, const struct v4l2_dbg_register *req) |
819 | { | 819 | { |
820 | struct pvr2_v4l2_fh *fh = file->private_data; | 820 | struct pvr2_v4l2_fh *fh = file->private_data; |
821 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; | 821 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; |
diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c index f6a6cdc8b288..c4c723b92f6e 100644 --- a/drivers/media/usb/stk1160/stk1160-v4l.c +++ b/drivers/media/usb/stk1160/stk1160-v4l.c | |||
@@ -500,7 +500,7 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
500 | } | 500 | } |
501 | 501 | ||
502 | static int vidioc_s_register(struct file *file, void *priv, | 502 | static int vidioc_s_register(struct file *file, void *priv, |
503 | struct v4l2_dbg_register *reg) | 503 | const struct v4l2_dbg_register *reg) |
504 | { | 504 | { |
505 | struct stk1160 *dev = video_drvdata(file); | 505 | struct stk1160 *dev = video_drvdata(file); |
506 | 506 | ||
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index 041f19e1b05b..d34c2afe2c24 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
@@ -483,7 +483,7 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
483 | } | 483 | } |
484 | 484 | ||
485 | static int vidioc_s_register(struct file *file, void *priv, | 485 | static int vidioc_s_register(struct file *file, void *priv, |
486 | struct v4l2_dbg_register *reg) | 486 | const struct v4l2_dbg_register *reg) |
487 | { | 487 | { |
488 | struct usb_usbvision *usbvision = video_drvdata(file); | 488 | struct usb_usbvision *usbvision = video_drvdata(file); |
489 | int err_code; | 489 | int err_code; |
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 29c751d86061..936ca25bd5be 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
@@ -1813,7 +1813,7 @@ static int v4l_dbg_s_register(const struct v4l2_ioctl_ops *ops, | |||
1813 | struct file *file, void *fh, void *arg) | 1813 | struct file *file, void *fh, void *arg) |
1814 | { | 1814 | { |
1815 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 1815 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1816 | struct v4l2_dbg_register *p = arg; | 1816 | const struct v4l2_dbg_register *p = arg; |
1817 | 1817 | ||
1818 | if (!capable(CAP_SYS_ADMIN)) | 1818 | if (!capable(CAP_SYS_ADMIN)) |
1819 | return -EPERM; | 1819 | return -EPERM; |
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index ee7b7c67c87a..a4175cda4fc1 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -242,7 +242,7 @@ struct v4l2_ioctl_ops { | |||
242 | int (*vidioc_g_register) (struct file *file, void *fh, | 242 | int (*vidioc_g_register) (struct file *file, void *fh, |
243 | struct v4l2_dbg_register *reg); | 243 | struct v4l2_dbg_register *reg); |
244 | int (*vidioc_s_register) (struct file *file, void *fh, | 244 | int (*vidioc_s_register) (struct file *file, void *fh, |
245 | struct v4l2_dbg_register *reg); | 245 | const struct v4l2_dbg_register *reg); |
246 | #endif | 246 | #endif |
247 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | 247 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, |
248 | struct v4l2_dbg_chip_ident *chip); | 248 | struct v4l2_dbg_chip_ident *chip); |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 79784fc8f9e9..8158a0810fdc 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -165,7 +165,7 @@ struct v4l2_subdev_core_ops { | |||
165 | long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); | 165 | long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); |
166 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 166 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
167 | int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); | 167 | int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); |
168 | int (*s_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); | 168 | int (*s_register)(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg); |
169 | #endif | 169 | #endif |
170 | int (*s_power)(struct v4l2_subdev *sd, int on); | 170 | int (*s_power)(struct v4l2_subdev *sd, int on); |
171 | int (*interrupt_service_routine)(struct v4l2_subdev *sd, | 171 | int (*interrupt_service_routine)(struct v4l2_subdev *sd, |