diff mbox

[V2] net/stmmac: Move "#include <linux/platform_device.h>" to linux/stmmac.h

Message ID 51e0617ee964ae60313a99804f4842ac6e96c129.1304397312.git.viresh.kumar@st.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Viresh KUMAR May 3, 2011, 4:36 a.m. UTC
stmmac.h uses struct platform_device and doesn't include
<linux/platform_device.h>. Whereas drivers/net/stmmac/stmmac.h includes it, but
doesn't directly use it. And so we get following compilation warning while using
this file:
	warning: ‘struct platform_device’ declared inside parameter list

This patch includes <linux/platform_device.h> in linux/stmmac.h and removes it
from drivers/net/stmmac/stmmac.h

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/net/stmmac/stmmac.h |    1 -
 include/linux/stmmac.h      |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)

Comments

Giuseppe CAVALLARO May 3, 2011, 5:36 a.m. UTC | #1
On 5/3/2011 6:36 AM, Viresh Kumar wrote:
> stmmac.h uses struct platform_device and doesn't include
> <linux/platform_device.h>. Whereas drivers/net/stmmac/stmmac.h includes it, but
> doesn't directly use it. And so we get following compilation warning while using
> this file:
> 	warning: ‘struct platform_device’ declared inside parameter list
> 
> This patch includes <linux/platform_device.h> in linux/stmmac.h and removes it
> from drivers/net/stmmac/stmmac.h
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>  drivers/net/stmmac/stmmac.h |    1 -
>  include/linux/stmmac.h      |    2 ++
>  2 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/stmmac/stmmac.h b/drivers/net/stmmac/stmmac.h
> index 5f06c47..2b076b3 100644
> --- a/drivers/net/stmmac/stmmac.h
> +++ b/drivers/net/stmmac/stmmac.h
> @@ -21,7 +21,6 @@
>  *******************************************************************************/
>  
>  #define DRV_MODULE_VERSION	"Nov_2010"
> -#include <linux/platform_device.h>
>  #include <linux/stmmac.h>
>  
>  #include "common.h"
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index f29197a..9529e49 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -26,6 +26,8 @@
>  #ifndef __STMMAC_PLATFORM_DATA
>  #define __STMMAC_PLATFORM_DATA
>  
> +#include <linux/platform_device.h>
> +
>  /* platform data for platform device structure's platform_data field */
>  
>  /* Private data for the STM on-board ethernet driver */

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/stmmac/stmmac.h b/drivers/net/stmmac/stmmac.h
index 5f06c47..2b076b3 100644
--- a/drivers/net/stmmac/stmmac.h
+++ b/drivers/net/stmmac/stmmac.h
@@ -21,7 +21,6 @@ 
 *******************************************************************************/
 
 #define DRV_MODULE_VERSION	"Nov_2010"
-#include <linux/platform_device.h>
 #include <linux/stmmac.h>
 
 #include "common.h"
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index f29197a..9529e49 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -26,6 +26,8 @@ 
 #ifndef __STMMAC_PLATFORM_DATA
 #define __STMMAC_PLATFORM_DATA
 
+#include <linux/platform_device.h>
+
 /* platform data for platform device structure's platform_data field */
 
 /* Private data for the STM on-board ethernet driver */