diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2016-08-25 17:19:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-31 07:05:43 -0400 |
commit | 2b7adc460ff8bff95f79c03451448895e761c4a6 (patch) | |
tree | ba4cd80c4c411c2f0042bc8efa72e75dcf1574a0 /drivers/hwtracing | |
parent | 68905d73df5d51ba1318a0ad3f3c5a65c4e646a2 (diff) |
coresight: remove duplicated enumeration
Both ETMv3 and ETMv4 drivers are declaring an 'enum etm_addr_type',
creating reduncancy.
This patch removes the enumeration from the driver files and adds
it to a common header.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm.h | 8 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 1 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 1 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm4x.h | 8 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-priv.h | 8 |
5 files changed, 10 insertions, 16 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm.h b/drivers/hwtracing/coresight/coresight-etm.h index 51597cb2c08a..4a18ee499965 100644 --- a/drivers/hwtracing/coresight/coresight-etm.h +++ b/drivers/hwtracing/coresight/coresight-etm.h | |||
@@ -259,14 +259,6 @@ struct etm_drvdata { | |||
259 | struct etm_config config; | 259 | struct etm_config config; |
260 | }; | 260 | }; |
261 | 261 | ||
262 | enum etm_addr_type { | ||
263 | ETM_ADDR_TYPE_NONE, | ||
264 | ETM_ADDR_TYPE_SINGLE, | ||
265 | ETM_ADDR_TYPE_RANGE, | ||
266 | ETM_ADDR_TYPE_START, | ||
267 | ETM_ADDR_TYPE_STOP, | ||
268 | }; | ||
269 | |||
270 | static inline void etm_writel(struct etm_drvdata *drvdata, | 262 | static inline void etm_writel(struct etm_drvdata *drvdata, |
271 | u32 val, u32 off) | 263 | u32 val, u32 off) |
272 | { | 264 | { |
diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c index 4856c8098416..e9b071953f80 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm_runtime.h> | 18 | #include <linux/pm_runtime.h> |
19 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
20 | #include "coresight-etm.h" | 20 | #include "coresight-etm.h" |
21 | #include "coresight-priv.h" | ||
21 | 22 | ||
22 | static ssize_t nr_addr_cmp_show(struct device *dev, | 23 | static ssize_t nr_addr_cmp_show(struct device *dev, |
23 | struct device_attribute *attr, char *buf) | 24 | struct device_attribute *attr, char *buf) |
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index fd7ff613db17..b9b1e9c8f4c4 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm_runtime.h> | 18 | #include <linux/pm_runtime.h> |
19 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
20 | #include "coresight-etm4x.h" | 20 | #include "coresight-etm4x.h" |
21 | #include "coresight-priv.h" | ||
21 | 22 | ||
22 | static int etm4_set_mode_exclude(struct etmv4_drvdata *drvdata, bool exclude) | 23 | static int etm4_set_mode_exclude(struct etmv4_drvdata *drvdata, bool exclude) |
23 | { | 24 | { |
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 2629954429a1..ba8d3f86de21 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h | |||
@@ -410,14 +410,6 @@ enum etm_addr_ctxtype { | |||
410 | ETM_CTX_CTXID_VMID, | 410 | ETM_CTX_CTXID_VMID, |
411 | }; | 411 | }; |
412 | 412 | ||
413 | enum etm_addr_type { | ||
414 | ETM_ADDR_TYPE_NONE, | ||
415 | ETM_ADDR_TYPE_SINGLE, | ||
416 | ETM_ADDR_TYPE_RANGE, | ||
417 | ETM_ADDR_TYPE_START, | ||
418 | ETM_ADDR_TYPE_STOP, | ||
419 | }; | ||
420 | |||
421 | extern const struct attribute_group *coresight_etmv4_groups[]; | 413 | extern const struct attribute_group *coresight_etmv4_groups[]; |
422 | void etm4_config_trace_mode(struct etmv4_config *config); | 414 | void etm4_config_trace_mode(struct etmv4_config *config); |
423 | #endif | 415 | #endif |
diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index 39841d1f58e0..196a14be4b3d 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h | |||
@@ -56,6 +56,14 @@ static ssize_t name##_show(struct device *_dev, \ | |||
56 | } \ | 56 | } \ |
57 | static DEVICE_ATTR_RO(name) | 57 | static DEVICE_ATTR_RO(name) |
58 | 58 | ||
59 | enum etm_addr_type { | ||
60 | ETM_ADDR_TYPE_NONE, | ||
61 | ETM_ADDR_TYPE_SINGLE, | ||
62 | ETM_ADDR_TYPE_RANGE, | ||
63 | ETM_ADDR_TYPE_START, | ||
64 | ETM_ADDR_TYPE_STOP, | ||
65 | }; | ||
66 | |||
59 | enum cs_mode { | 67 | enum cs_mode { |
60 | CS_MODE_DISABLED, | 68 | CS_MODE_DISABLED, |
61 | CS_MODE_SYSFS, | 69 | CS_MODE_SYSFS, |