Make the fwnode arguments to V4L2 fwnode API const as this is now possible. Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html