Commit 9e0ebf74 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[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.
parent 237e409d
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment