diff options
author | Julia Lawall <julia@diku.dk> | 2009-07-06 22:09:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-06 22:09:50 -0400 |
commit | ef0657c49e0f93dcebc9b4719e4fe0b478411f60 (patch) | |
tree | 2831b4c65c9008ff66b821c47a032a3ca65f3ca3 /drivers/net/cs89x0.c | |
parent | 5dcc60b71886795965fd5029b5d9a9ba7b5a2c17 (diff) |
drivers/net/cs89x0.c: Avoid using magic number in set_dma_mode
The constant DMA_RX_MODE is defined to be 0x14 in the local include file
cs89x0.h. Since a constant with the same name is used elsewhere with
set_dma_mode, it seems likely that this constant could be used here.
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ expression E1; identifier I; constant int C; @@
(
set_dma_mode(E1,I,...)
|
*set_dma_mode(E1,C,...)
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cs89x0.c')
-rw-r--r-- | drivers/net/cs89x0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index b5f553a4aa48..e5948970a42a 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1367,7 +1367,7 @@ net_open(struct net_device *dev) | |||
1367 | spin_lock_irqsave(&lp->lock, flags); | 1367 | spin_lock_irqsave(&lp->lock, flags); |
1368 | disable_dma(dev->dma); | 1368 | disable_dma(dev->dma); |
1369 | clear_dma_ff(dev->dma); | 1369 | clear_dma_ff(dev->dma); |
1370 | set_dma_mode(dev->dma, 0x14); /* auto_init as well */ | 1370 | set_dma_mode(dev->dma, DMA_RX_MODE); /* auto_init as well */ |
1371 | set_dma_addr(dev->dma, isa_virt_to_bus(lp->dma_buff)); | 1371 | set_dma_addr(dev->dma, isa_virt_to_bus(lp->dma_buff)); |
1372 | set_dma_count(dev->dma, lp->dmasize*1024); | 1372 | set_dma_count(dev->dma, lp->dmasize*1024); |
1373 | enable_dma(dev->dma); | 1373 | enable_dma(dev->dma); |