All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hans.verkuil@cisco.com>
To: linux-media@vger.kernel.org
Subject: [RFCv3 API PATCH 25/31] v4l2: make vidioc_s_modulator const.
Date: Fri, 14 Sep 2012 12:57:40 +0200	[thread overview]
Message-ID: <5aa6575923a8453a336cc67cc0ca66df6e70d83f.1347619766.git.hans.verkuil@cisco.com> (raw)
In-Reply-To: <1347620266-13767-1-git-send-email-hans.verkuil@cisco.com>
In-Reply-To: <7447a305817a5e6c63f089c2e1e948533f1d57ea.1347619765.git.hans.verkuil@cisco.com>

Write-only ioctls should have a const argument in the ioctl op.

Do this conversion for vidioc_s_modulator.

Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/radio/radio-keene.c       |    2 +-
 drivers/media/radio/radio-si4713.c      |    2 +-
 drivers/media/radio/radio-wl1273.c      |    2 +-
 drivers/media/radio/si4713-i2c.c        |    4 ++--
 drivers/media/radio/wl128x/fmdrv_v4l2.c |    2 +-
 include/media/v4l2-ioctl.h              |    2 +-
 include/media/v4l2-subdev.h             |    2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
index 79adf3e..e10e525 100644
--- a/drivers/media/radio/radio-keene.c
+++ b/drivers/media/radio/radio-keene.c
@@ -203,7 +203,7 @@ static int vidioc_g_modulator(struct file *file, void *priv,
 }
 
 static int vidioc_s_modulator(struct file *file, void *priv,
-				struct v4l2_modulator *v)
+				const struct v4l2_modulator *v)
 {
 	struct keene_device *radio = video_drvdata(file);
 
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c
index 1e04101..a082e40 100644
--- a/drivers/media/radio/radio-si4713.c
+++ b/drivers/media/radio/radio-si4713.c
@@ -200,7 +200,7 @@ static int radio_si4713_g_modulator(struct file *file, void *p,
 }
 
 static int radio_si4713_s_modulator(struct file *file, void *p,
-						struct v4l2_modulator *vm)
+						const struct v4l2_modulator *vm)
 {
 	return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner,
 							s_modulator, vm);
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index 2d93354..b53ecbc 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -1715,7 +1715,7 @@ out:
 }
 
 static int wl1273_fm_vidioc_s_modulator(struct file *file, void *priv,
-					struct v4l2_modulator *modulator)
+					const struct v4l2_modulator *modulator)
 {
 	struct wl1273_device *radio = video_get_drvdata(video_devdata(file));
 	struct wl1273_core *core = radio->core;
diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c
index b898c89..a9e6d17 100644
--- a/drivers/media/radio/si4713-i2c.c
+++ b/drivers/media/radio/si4713-i2c.c
@@ -1213,7 +1213,7 @@ exit:
 }
 
 static int si4713_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f);
-static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *);
+static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *);
 /*
  * si4713_setup - Sets the device up with current configuration.
  * @sdev: si4713_device structure for the device we are communicating
@@ -1873,7 +1873,7 @@ exit:
 }
 
 /* si4713_s_modulator - set modulator attributes */
-static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
+static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *vm)
 {
 	struct si4713_device *sdev = to_si4713_device(sd);
 	int rval = 0;
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c
index 09585a9..8a672a3 100644
--- a/drivers/media/radio/wl128x/fmdrv_v4l2.c
+++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c
@@ -448,7 +448,7 @@ static int fm_v4l2_vidioc_g_modulator(struct file *file, void *priv,
 
 /* Set modulator attributes. If mode is not TX, set to TX. */
 static int fm_v4l2_vidioc_s_modulator(struct file *file, void *priv,
-		struct v4l2_modulator *mod)
+		const struct v4l2_modulator *mod)
 {
 	struct fmdev *fmdev = video_drvdata(file);
 	u8 rds_mode;
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index d4c7729..fbeb00e 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -179,7 +179,7 @@ struct v4l2_ioctl_ops {
 	int (*vidioc_g_modulator)      (struct file *file, void *fh,
 					struct v4l2_modulator *a);
 	int (*vidioc_s_modulator)      (struct file *file, void *fh,
-					struct v4l2_modulator *a);
+					const struct v4l2_modulator *a);
 	/* Crop ioctls */
 	int (*vidioc_cropcap)          (struct file *file, void *fh,
 					struct v4l2_cropcap *a);
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 22ab09e..e698f2c 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -194,7 +194,7 @@ struct v4l2_subdev_tuner_ops {
 	int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
 	int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
 	int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
-	int (*s_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
+	int (*s_modulator)(struct v4l2_subdev *sd, const struct v4l2_modulator *vm);
 	int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
 	int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
 };
-- 
1.7.10.4


  parent reply	other threads:[~2012-09-14 10:58 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 10:57 [RFCv3 API PATCH 00/31] Full series of API fixes from the 2012 Media Workshop Hans Verkuil
2012-09-14 10:57 ` [RFCv3 API PATCH 01/31] v4l: Remove experimental tag from certain API elements Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 02/31] videodev2.h: split off controls into v4l2-controls.h Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 03/31] DocBook: improve STREAMON/OFF documentation Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 04/31] DocBook: make the G/S/TRY_FMT specification more strict Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 05/31] DocBook: bus_info can no longer be empty Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 06/31] vivi/mem2mem_testdev: update to latest bus_info specification Hans Verkuil
2012-09-14 17:34     ` Sylwester Nawrocki
2012-09-14 10:57   ` [RFCv3 API PATCH 07/31] v4l2-core: deprecate V4L2_BUF_TYPE_PRIVATE Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 08/31] DocBook: " Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 09/31] v4l2: remove experimental tag from a number of old drivers Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 10/31] DocBook: document when to return ENODATA Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 11/31] v4l2-core: tvnorms may be 0 for a given input, handle that case Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 12/31] Rename V4L2_(IN|OUT)_CAP_CUSTOM_TIMINGS Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 13/31] Feature removal: Remove CUSTOM_TIMINGS defines in 3.9 Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 14/31] DocBook: fix awkward language and fix the documented return value Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 15/31] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability Hans Verkuil
2012-09-14 20:25     ` Sakari Ailus
2012-09-14 20:27       ` Rémi Denis-Courmont
2012-09-14 21:05         ` Sakari Ailus
2012-09-15  7:41           ` Hans Verkuil
2012-09-15  9:31             ` Laurent Pinchart
2012-09-15 10:05               ` Hans Verkuil
2012-09-15 10:37                 ` Sakari Ailus
2012-09-15 12:35                   ` Hans Verkuil
2012-09-15 20:16                     ` Sylwester Nawrocki
2012-09-16 13:57                       ` Hans Verkuil
2012-09-16 15:33                         ` Laurent Pinchart
2012-09-16 21:59                           ` Sylwester Nawrocki
2012-09-17  7:13                             ` Daniel Glöckner
2012-09-17  9:18                             ` Laurent Pinchart
2012-09-17  9:28                               ` Hans Verkuil
2012-09-17  9:30                               ` Daniel Glöckner
2012-09-17 17:19                             ` Sakari Ailus
2012-09-17 20:27                               ` Sylwester Nawrocki
2012-09-18  7:42                                 ` Sakari Ailus
2012-09-15 10:26               ` Sylwester Nawrocki
2012-09-14 10:57   ` [RFCv3 API PATCH 16/31] Add V4L2_CAP_MONOTONIC_TS where applicable Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 17/31] DocBook: clarify that sequence is also set for output devices Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 18/31] DocBook: Mark CROPCAP as optional instead of as compulsory Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 19/31] v4l2: make vidioc_s_fbuf const Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 20/31] v4l2: make vidioc_s_jpegcomp const Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 21/31] v4l2: make vidioc_s_freq_hw_seek const Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 22/31] v4l2: make vidioc_(un)subscribe_event const Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 23/31] v4l2: make vidioc_s_audio const Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 24/31] v4l2: make vidioc_s_audout const Hans Verkuil
2012-09-14 10:57   ` Hans Verkuil [this message]
2012-09-14 10:57   ` [RFCv3 API PATCH 26/31] v4l2: make vidioc_s_crop const Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 27/31] v4l2-dev: add new VFL_DIR_ defines Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 28/31] Set vfl_dir for all display or m2m drivers Hans Verkuil
2012-09-14 17:34     ` Sylwester Nawrocki
2012-09-14 10:57   ` [RFCv3 API PATCH 29/31] v4l2-dev: improve ioctl validity checks Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 30/31] v4l2-dev: reorder checks into blocks of ioctls with similar properties Hans Verkuil
2012-09-14 10:57   ` [RFCv3 API PATCH 31/31] Add vfl_dir field documentation Hans Verkuil
2012-09-14 17:34     ` Sylwester Nawrocki
2012-09-14 17:59       ` Hans Verkuil
2012-09-14 21:26 ` [RFCv3 API PATCH 00/31] Full series of API fixes from the 2012 Media Workshop Sakari Ailus
2012-09-15  7:33   ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5aa6575923a8453a336cc67cc0ca66df6e70d83f.1347619766.git.hans.verkuil@cisco.com \
    --to=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.