coresight: remove duplicated enumeration
authorMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 25 Aug 2016 21:19:11 +0000 (15:19 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 11:05:43 +0000 (13:05 +0200)
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>
drivers/hwtracing/coresight/coresight-etm.h
drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
drivers/hwtracing/coresight/coresight-etm4x.h
drivers/hwtracing/coresight/coresight-priv.h

index 51597cb2c08af69293c0b17d8698019fc8af949e..4a18ee4999658eccbe16eb619d83efecc1c682cb 100644 (file)
@@ -259,14 +259,6 @@ struct etm_drvdata {
        struct etm_config               config;
 };
 
-enum etm_addr_type {
-       ETM_ADDR_TYPE_NONE,
-       ETM_ADDR_TYPE_SINGLE,
-       ETM_ADDR_TYPE_RANGE,
-       ETM_ADDR_TYPE_START,
-       ETM_ADDR_TYPE_STOP,
-};
-
 static inline void etm_writel(struct etm_drvdata *drvdata,
                              u32 val, u32 off)
 {
index 4856c809841627c0a6c29845b3d4cc73fbb6f5e9..e9b071953f8099f832ac98f11acd563019dd6a45 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/sysfs.h>
 #include "coresight-etm.h"
+#include "coresight-priv.h"
 
 static ssize_t nr_addr_cmp_show(struct device *dev,
                                struct device_attribute *attr, char *buf)
index fd7ff613db1713a703f056a01f51b6cc722079f7..b9b1e9c8f4c4ffd528ecd6003c3a95a206febcc8 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/sysfs.h>
 #include "coresight-etm4x.h"
+#include "coresight-priv.h"
 
 static int etm4_set_mode_exclude(struct etmv4_drvdata *drvdata, bool exclude)
 {
index 2629954429a124cb57b850c4251d40366a91f508..ba8d3f86de2129dd869f156ade0d4a286ff158eb 100644 (file)
@@ -410,14 +410,6 @@ enum etm_addr_ctxtype {
        ETM_CTX_CTXID_VMID,
 };
 
-enum etm_addr_type {
-       ETM_ADDR_TYPE_NONE,
-       ETM_ADDR_TYPE_SINGLE,
-       ETM_ADDR_TYPE_RANGE,
-       ETM_ADDR_TYPE_START,
-       ETM_ADDR_TYPE_STOP,
-};
-
 extern const struct attribute_group *coresight_etmv4_groups[];
 void etm4_config_trace_mode(struct etmv4_config *config);
 #endif
index 39841d1f58e02e786c0ca3fff7656e831e689964..196a14be4b3da95306ff0a8994e9ecdaad86162b 100644 (file)
@@ -56,6 +56,14 @@ static ssize_t name##_show(struct device *_dev,                              \
 }                                                                      \
 static DEVICE_ATTR_RO(name)
 
+enum etm_addr_type {
+       ETM_ADDR_TYPE_NONE,
+       ETM_ADDR_TYPE_SINGLE,
+       ETM_ADDR_TYPE_RANGE,
+       ETM_ADDR_TYPE_START,
+       ETM_ADDR_TYPE_STOP,
+};
+
 enum cs_mode {
        CS_MODE_DISABLED,
        CS_MODE_SYSFS,