diff options
author | Mark Einon <mark.einon@gmail.com> | 2011-10-19 20:18:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-23 04:07:10 -0400 |
commit | 920d74a405a91248c65490b668c556d4d8f8028a (patch) | |
tree | 802424b82d1dc93f5bc135cc81f33d6f27232291 /drivers | |
parent | 82e4b35f4d71199e90ab00a84bdbfae028f9fa62 (diff) |
staging: et131x: Moving two extern inline functions to .c file
Two helper functions for adding 10bit/12bit umbers with wrapping are
defined in the header. Moved them to the driver .c file.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/et131x/et131x.c | 11 | ||||
-rw-r--r-- | drivers/staging/et131x/et131x.h | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 959610226d78..14f54e42a23b 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c | |||
@@ -2666,6 +2666,17 @@ void et131x_rx_dma_enable(struct et131x_adapter *adapter) | |||
2666 | } | 2666 | } |
2667 | } | 2667 | } |
2668 | 2668 | ||
2669 | |||
2670 | static inline void add_10bit(u32 *v, int n) | ||
2671 | { | ||
2672 | *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP); | ||
2673 | } | ||
2674 | |||
2675 | static inline void add_12bit(u32 *v, int n) | ||
2676 | { | ||
2677 | *v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP); | ||
2678 | } | ||
2679 | |||
2669 | /** | 2680 | /** |
2670 | * nic_rx_pkts - Checks the hardware for available packets | 2681 | * nic_rx_pkts - Checks the hardware for available packets |
2671 | * @adapter: pointer to our adapter | 2682 | * @adapter: pointer to our adapter |
diff --git a/drivers/staging/et131x/et131x.h b/drivers/staging/et131x/et131x.h index 84b274d90ce2..7eed3c8986f1 100644 --- a/drivers/staging/et131x/et131x.h +++ b/drivers/staging/et131x/et131x.h | |||
@@ -230,16 +230,6 @@ struct global_regs { /* Location: */ | |||
230 | #define INDEX10(x) ((x) & ET_DMA10_MASK) | 230 | #define INDEX10(x) ((x) & ET_DMA10_MASK) |
231 | #define INDEX4(x) ((x) & ET_DMA4_MASK) | 231 | #define INDEX4(x) ((x) & ET_DMA4_MASK) |
232 | 232 | ||
233 | extern inline void add_10bit(u32 *v, int n) | ||
234 | { | ||
235 | *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP); | ||
236 | } | ||
237 | |||
238 | extern inline void add_12bit(u32 *v, int n) | ||
239 | { | ||
240 | *v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP); | ||
241 | } | ||
242 | |||
243 | /* | 233 | /* |
244 | * 10bit DMA with wrap | 234 | * 10bit DMA with wrap |
245 | * txdma tx queue write address reg in txdma address map at 0x1010 | 235 | * txdma tx queue write address reg in txdma address map at 0x1010 |