lkml.org 
[lkml]   [2002]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] opl3sa2 isapnp activation fix
On Tue, 4 Jun 2002, Zwane Mwaikambo wrote:

> > if(dev->activate(dev) < 0) {
> > - printk(KERN_WARNING PFX "ISA PnP activate failed\n");
> > - opl3sa2_state[card].activated = 0;
> > - return -ENODEV;
> > + /*
> > + * isapnp.c disallows dma=0 but some opl3sa2 cards need it.
> > + * So we set dma by hand and try again
> > + */
> > + if (dma < 0 || dma > 7)
> > + dma= 0;
> > + if (dma2 < 0 || dma2 >7)
> > + dma2= 1;
>
> Oops, that won't work on isapnp since dma = dma2 = -1 at this stage, how
> about;
>
> if ((dma != -1) && (dma2 != -1)) frob();
>
> you shouldn't hard set 0,1

You can move the check earlier on so that you do the first activate with
the supplied dma settings, therefore avoiding the double take. That way
you'd also not add any additional frobbing for the normal case.

--
http://function.linuxpower.ca


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.074 / U:2.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site