Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd4242df authored by Rayagond Kokatanur's avatar Rayagond Kokatanur Committed by David S. Miller
Browse files

stmmac: add header inclusion protection



This patch adds "#ifndef __<header>_H" for protecting header from double
inclusion.

Signed-off-by: default avatarRayagond Kokatanur <rayagond@vayavyalabs.com>
Hacked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78df76a0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@
  Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
*******************************************************************************/

#ifndef __COMMON_H__
#define __COMMON_H__

#include <linux/etherdevice.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
@@ -366,3 +369,5 @@ extern void stmmac_set_mac(void __iomem *ioaddr, bool enable);

extern void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
extern const struct stmmac_ring_mode_ops ring_mode_ops;

#endif /* __COMMON_H__ */
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@

  Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
*******************************************************************************/

#ifndef __DESCS_H__
#define __DESCS_H__

struct dma_desc {
	/* Receive descriptor */
	union {
@@ -166,3 +170,5 @@ enum tdes_csum_insertion {
					 * is not calculated */
	cic_full = 3,		/* IP header and pseudoheader */
};

#endif /* __DESCS_H__ */
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@
  Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
*******************************************************************************/

#ifndef __DESC_COM_H__
#define __DESC_COM_H__

#if defined(CONFIG_STMMAC_RING)
static inline void ehn_desc_rx_set_on_ring_chain(struct dma_desc *p, int end)
{
@@ -124,3 +127,5 @@ static inline void norm_set_tx_desc_len(struct dma_desc *p, int len)
	p->des01.tx.buffer1_size = len;
}
#endif

#endif /* __DESC_COM_H__ */
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@
  Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
*******************************************************************************/

#ifndef __DWMAC100_H__
#define __DWMAC100_H__

#include <linux/phy.h>
#include "common.h"

@@ -119,3 +122,5 @@ enum ttc_control {
#define DMA_MISSED_FRAME_M_CNTR	0x0000ffff	/* Missed Frame Couinter */

extern const struct stmmac_dma_ops dwmac100_dma_ops;

#endif /* __DWMAC100_H__ */
+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@

  Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
*******************************************************************************/
#ifndef __DWMAC1000_H__
#define __DWMAC1000_H__

#include <linux/phy.h>
#include "common.h"
@@ -232,3 +234,4 @@ enum rtc_control {
#define	DWMAC_CORE_3_40	0x34

extern const struct stmmac_dma_ops dwmac1000_dma_ops;
#endif /* __DWMAC1000_H__ */
Loading