summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-07-12 21:01:12 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-12 21:01:12 -0700
commit9e0ebf74047e0731f91ca48ea653c64e467adcaa (patch)
tree4223e808392e42049b99b35f2ad02d0323add2a2
parent237e409d97333afc6f1c7ae6fabe4b9e69151ab3 (diff)
[PATCH] sparse: tms380tr.c fix
tms380tr is used both by ISA and PCI drivers. Enabling/disabling DMA is done only for ISA ones (it's protected by if (dev->dma > 0) and PCI ones leave it 0), but it's compiled unconditionally. Which breaks on platforms that don't have that ISA crap at all, but support PCI just fine. Code in question placed under ifdef CONFIG_ISA.
-rw-r--r--drivers/net/tokenring/tms380tr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index afd1dc2a6158..9d121890b6fb 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -252,6 +252,7 @@ int tms380tr_open(struct net_device *dev)
/* Reset the hardware here. Don't forget to set the station address. */
+#ifdef CONFIG_ISA
if(dev->dma > 0)
{
unsigned long flags=claim_dma_lock();
@@ -260,6 +261,7 @@ int tms380tr_open(struct net_device *dev)
enable_dma(dev->dma);
release_dma_lock(flags);
}
+#endif
err = tms380tr_chipset_init(dev);
if(err)
@@ -1149,12 +1151,14 @@ int tms380tr_close(struct net_device *dev)
del_timer(&tp->timer);
tms380tr_disable_interrupts(dev);
+#ifdef CONFIG_ISA
if(dev->dma > 0)
{
unsigned long flags=claim_dma_lock();
disable_dma(dev->dma);
release_dma_lock(flags);
}
+#endif
SIFWRITEW(0xFF00, SIFCMD);
#if 0