devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-acpi@vger.kernel.org
Cc: devicetree@vger.kernel.org, sudeep.holla@arm.com,
	lorenzo.pieralisi@arm.com, mika.westerberg@linux.intel.com,
	rafael@kernel.org, mark.rutland@arm.com, broonie@kernel.org,
	robh@kernel.org, ahs3@redhat.com, frowand.list@gmail.com
Subject: [PATCH 6/7] v4l: fwnode: Constify fwnode endpoints
Date: Mon, 22 May 2017 12:07:41 +0300	[thread overview]
Message-ID: <1495444062-23867-7-git-send-email-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <1495444062-23867-1-git-send-email-sakari.ailus@linux.intel.com>

Make the fwnode arguments to V4L2 fwnode API const as this is now
possible.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/v4l2-core/v4l2-fwnode.c | 12 ++++++------
 include/media/v4l2-fwnode.h           |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
index 153c53c..a68ed05 100644
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -28,8 +28,8 @@
 
 #include <media/v4l2-fwnode.h>
 
-static int v4l2_fwnode_endpoint_parse_csi_bus(struct fwnode_handle *fwnode,
-					      struct v4l2_fwnode_endpoint *vep)
+static int v4l2_fwnode_endpoint_parse_csi_bus(
+	const struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep)
 {
 	struct v4l2_fwnode_bus_mipi_csi2 *bus = &vep->bus.mipi_csi2;
 	bool have_clk_lane = false;
@@ -97,7 +97,7 @@ static int v4l2_fwnode_endpoint_parse_csi_bus(struct fwnode_handle *fwnode,
 }
 
 static void v4l2_fwnode_endpoint_parse_parallel_bus(
-	struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep)
+	const struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep)
 {
 	struct v4l2_fwnode_bus_parallel *bus = &vep->bus.parallel;
 	unsigned int flags = 0;
@@ -165,7 +165,7 @@ static void v4l2_fwnode_endpoint_parse_parallel_bus(
  *
  * Return: 0 on success or a negative error code on failure.
  */
-int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
+int v4l2_fwnode_endpoint_parse(const struct fwnode_handle *fwnode,
 			       struct v4l2_fwnode_endpoint *vep)
 {
 	int rval;
@@ -232,7 +232,7 @@ EXPORT_SYMBOL_GPL(v4l2_fwnode_endpoint_free);
  * on error.
  */
 struct v4l2_fwnode_endpoint *v4l2_fwnode_endpoint_alloc_parse(
-	struct fwnode_handle *fwnode)
+	const struct fwnode_handle *fwnode)
 {
 	struct v4l2_fwnode_endpoint *vep;
 	int rval;
@@ -291,7 +291,7 @@ EXPORT_SYMBOL_GPL(v4l2_fwnode_endpoint_alloc_parse);
  * Return: 0 on success, or -ENOLINK if the remote endpoint fwnode can't be
  * found.
  */
-int v4l2_fwnode_parse_link(struct fwnode_handle *__fwnode,
+int v4l2_fwnode_parse_link(const struct fwnode_handle *__fwnode,
 			   struct v4l2_fwnode_link *link)
 {
 	const char *port_prop = is_of_node(__fwnode) ? "reg" : "port";
diff --git a/include/media/v4l2-fwnode.h b/include/media/v4l2-fwnode.h
index ecc1233..bdbd785 100644
--- a/include/media/v4l2-fwnode.h
+++ b/include/media/v4l2-fwnode.h
@@ -92,12 +92,12 @@ struct v4l2_fwnode_link {
 	unsigned int remote_port;
 };
 
-int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
+int v4l2_fwnode_endpoint_parse(const struct fwnode_handle *fwnode,
 			       struct v4l2_fwnode_endpoint *vep);
 struct v4l2_fwnode_endpoint *v4l2_fwnode_endpoint_alloc_parse(
-	struct fwnode_handle *fwnode);
+	const struct fwnode_handle *fwnode);
 void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep);
-int v4l2_fwnode_parse_link(struct fwnode_handle *fwnode,
+int v4l2_fwnode_parse_link(const struct fwnode_handle *fwnode,
 			   struct v4l2_fwnode_link *link);
 void v4l2_fwnode_put_link(struct v4l2_fwnode_link *link);
 
-- 
2.7.4


  parent reply	other threads:[~2017-05-22  9:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22  9:07 [PATCH 0/7] Constify property fwnode arguments Sakari Ailus
2017-05-22  9:07 ` [PATCH 1/7] ACPI: Constify acpi_get_next_subnode() fwnode argument Sakari Ailus
2017-05-22  9:07 ` [PATCH 2/7] ACPI: Constify acpi_bus helper functions, switch to macros Sakari Ailus
2017-05-22  9:07 ` [PATCH 3/7] ACPI: Constify internal fwnode arguments Sakari Ailus
2017-05-22  9:07 ` [PATCH 4/7] device property: Constify argument to pset fwnode backend Sakari Ailus
2017-05-22  9:07 ` [PATCH 5/7] device property: Constify fwnode property API Sakari Ailus
2017-05-22  9:07 ` Sakari Ailus [this message]
     [not found] ` <1495444062-23867-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-05-22  9:07   ` [PATCH 7/7] v4l2-async: Make fwnode const Sakari Ailus

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=1495444062-23867-7-git-send-email-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=ahs3@redhat.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=sudeep.holla@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).