coresight: use const for device_node structures
authorLeo Yan <leo.yan@linaro.org>
Mon, 5 Jun 2017 20:15:06 +0000 (14:15 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:45:24 +0000 (11:45 +0200)
Almost low level functions from open firmware have used const to
qualify device_node structures, so add const for device_node
parameters in of_coresight related functions.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/of_coresight.c
include/linux/coresight.h

index 09142e99e915e8230c7de2d88a9ff259c14e9e3e..2749853b9010e48f3495ab7eb787f38e1a848989 100644 (file)
@@ -52,7 +52,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint)
                               endpoint, of_dev_node_match);
 }
 
-static void of_coresight_get_ports(struct device_node *node,
+static void of_coresight_get_ports(const struct device_node *node,
                                   int *nr_inport, int *nr_outport)
 {
        struct device_node *ep = NULL;
@@ -101,8 +101,9 @@ static int of_coresight_alloc_memory(struct device *dev,
        return 0;
 }
 
-struct coresight_platform_data *of_get_coresight_platform_data(
-                               struct device *dev, struct device_node *node)
+struct coresight_platform_data *
+of_get_coresight_platform_data(struct device *dev,
+                              const struct device_node *node)
 {
        int i = 0, ret = 0, cpu;
        struct coresight_platform_data *pdata;
index 035c16c9a5051afccd8e77db5417335866812c8d..bf0aa50880be201d04932c09298263db36cca34e 100644 (file)
@@ -263,11 +263,12 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset,
 #endif
 
 #ifdef CONFIG_OF
-extern struct coresight_platform_data *of_get_coresight_platform_data(
-                               struct device *dev, struct device_node *node);
+extern struct coresight_platform_data *
+of_get_coresight_platform_data(struct device *dev,
+                              const struct device_node *node);
 #else
 static inline struct coresight_platform_data *of_get_coresight_platform_data(
-       struct device *dev, struct device_node *node) { return NULL; }
+       struct device *dev, const struct device_node *node) { return NULL; }
 #endif
 
 #ifdef CONFIG_PID_NS