Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1609215
| From | Leo Yan <leo.yan@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v5 5/9] coresight: use const for device_node structures |
| Date | 2017-03-25 19:30 +0100 |
| Message-ID | <toYBR-4DA-33@gated-at.bofh.it> (permalink) |
| References | <toYBQ-4DA-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/hwtracing/coresight/of_coresight.c | 6 +++---
include/linux/coresight.h | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c
index 78d2399..46eec0f 100644
--- a/drivers/hwtracing/coresight/of_coresight.c
+++ b/drivers/hwtracing/coresight/of_coresight.c
@@ -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,7 +101,7 @@ static int of_coresight_alloc_memory(struct device *dev,
return 0;
}
-int of_coresight_get_cpu(struct device_node *node)
+int of_coresight_get_cpu(const struct device_node *node)
{
int cpu;
bool found;
@@ -128,7 +128,7 @@ int of_coresight_get_cpu(struct device_node *node)
EXPORT_SYMBOL_GPL(of_coresight_get_cpu);
struct coresight_platform_data *of_get_coresight_platform_data(
- struct device *dev, struct device_node *node)
+ struct device *dev, const struct device_node *node)
{
int i = 0, ret = 0;
struct coresight_platform_data *pdata;
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index bf96678..4915254 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -263,13 +263,13 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset,
#endif
#ifdef CONFIG_OF
-extern int of_coresight_get_cpu(struct device_node *node);
+extern int of_coresight_get_cpu(const struct device_node *node);
extern struct coresight_platform_data *of_get_coresight_platform_data(
- struct device *dev, struct device_node *node);
+ struct device *dev, const struct device_node *node);
#else
-static inline int of_coresight_get_cpu(struct device_node *node) { return 0; }
+static inline int of_coresight_get_cpu(const struct device_node *node) { return 0; }
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
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v5 0/9] coresight: enable debug module Leo Yan <leo.yan@linaro.org> - 2017-03-25 19:30 +0100
[PATCH v5 8/9] arm64: dts: hi6220: register debug module Leo Yan <leo.yan@linaro.org> - 2017-03-25 19:30 +0100
[PATCH v5 6/9] coresight: add support for CPU debug module Leo Yan <leo.yan@linaro.org> - 2017-03-25 19:30 +0100
Re: [PATCH v5 6/9] coresight: add support for CPU debug module Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2017-03-27 18:40 +0200
[PATCH v5 5/9] coresight: use const for device_node structures Leo Yan <leo.yan@linaro.org> - 2017-03-25 19:30 +0100
[PATCH v5 7/9] clk: hi6220: add debug APB clock Leo Yan <leo.yan@linaro.org> - 2017-03-25 19:30 +0100
csiph-web