iwlwifi: don't include iwl-dev.h from iwl-devtrace.h
authorTejun Heo <tj@kernel.org>
Tue, 23 Mar 2010 06:55:39 +0000 (15:55 +0900)
committerTejun Heo <tj@kernel.org>
Tue, 30 Mar 2010 13:02:21 +0000 (22:02 +0900)
iwl-devtrace.h is used to declare and define trace points and
including iwl-dev.h from the file, which in turn includes other
generic headers, can lead to problems like generating duplicate copies
of generic trace points depending on the order of includes.  Don't
include iwl-dev.h from iwl-devtrace.h but include it from its users -
iwl-io.h and iwl-devtrace.c.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Intel Linux Wireless <ilw@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
drivers/net/wireless/iwlwifi/iwl-devtrace.c
drivers/net/wireless/iwlwifi/iwl-devtrace.h
drivers/net/wireless/iwlwifi/iwl-io.h

index 36580d8d8b8db4cbb6e5b38b2242d69ec8153045..2ffc2edbf4f08c0e189a09802f62080e31281aca 100644 (file)
@@ -28,6 +28,8 @@
 
 /* sparse doesn't like tracepoint macros */
 #ifndef __CHECKER__
+#include "iwl-dev.h"
+
 #define CREATE_TRACE_POINTS
 #include "iwl-devtrace.h"
 
index ff4d012ce2600dfbaf5ac7317138daa628e15880..ae7319bb3a9973f675e409d8e7c64968069adbcd 100644 (file)
@@ -28,7 +28,6 @@
 #define __IWLWIFI_DEVICE_TRACE
 
 #include <linux/tracepoint.h>
-#include "iwl-dev.h"
 
 #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
 #undef TRACE_EVENT
index c719baf2585a49583f2cef7a4b02107e044830a5..16eb3ced9b30c1f9301f0327b31487322c2248c3 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <linux/io.h>
 
+#include "iwl-dev.h"
 #include "iwl-debug.h"
 #include "iwl-devtrace.h"