diff options
Diffstat (limited to 'drivers/net/ethernet/ti/cpts.h')
-rw-r--r-- | drivers/net/ethernet/ti/cpts.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ti/cpts.h b/drivers/net/ethernet/ti/cpts.h index 69a46b92c7d6..416ba2c0d99a 100644 --- a/drivers/net/ethernet/ti/cpts.h +++ b/drivers/net/ethernet/ti/cpts.h @@ -111,7 +111,7 @@ struct cpts { struct cpsw_cpts __iomem *reg; int tx_enable; int rx_enable; -#ifdef CONFIG_TI_CPTS +#if IS_ENABLED(CONFIG_TI_CPTS) struct ptp_clock_info info; struct ptp_clock *clock; spinlock_t lock; /* protects time registers */ @@ -127,9 +127,11 @@ struct cpts { #endif }; -#ifdef CONFIG_TI_CPTS +#if IS_ENABLED(CONFIG_TI_CPTS) void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb); void cpts_tx_timestamp(struct cpts *cpts, struct sk_buff *skb); +int cpts_register(struct device *dev, struct cpts *cpts, u32 mult, u32 shift); +void cpts_unregister(struct cpts *cpts); #else static inline void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb) { @@ -137,9 +139,17 @@ static inline void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb) static inline void cpts_tx_timestamp(struct cpts *cpts, struct sk_buff *skb) { } + +static inline int +cpts_register(struct device *dev, struct cpts *cpts, u32 mult, u32 shift) +{ + return 0; +} + +static inline void cpts_unregister(struct cpts *cpts) +{ +} #endif -int cpts_register(struct device *dev, struct cpts *cpts, u32 mult, u32 shift); -void cpts_unregister(struct cpts *cpts); #endif |