Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146272
b: refs/heads/master
c: 73e0d48
h: refs/heads/master
v: v3
  • Loading branch information
Michael Buesch authored and Linus Torvalds committed Jun 11, 2009
1 parent 9161bea commit 1e80d85
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b4068a1287b02018d1b3159e7be6f27f3e3e68c
refs/heads/master: 73e0d48b8c28fb39a0bb6713c875e9919a9af546
34 changes: 18 additions & 16 deletions trunk/drivers/parport/parport_pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,17 +1246,17 @@ static void __devinit show_parconfig_smsc37c669(int io, int key)
(cr1 & 0x08 ) ? "Standard mode only (SPP)" : modes[cr4 & 0x03],
(cr4 & 0x40) ? "1.7" : "1.9");
}

/* Heuristics ! BIOS setup for this mainboard device limits
the choices to standard settings, i.e. io-address and IRQ
are related, however DMA can be 1 or 3, assume DMA_A=DMA1,
DMA_C=DMA3 (this is true e.g. for TYAN 1564D Tomcat IV) */
if(cr23*4 >=0x100) { /* if active */
while((superios[i].io!= 0) && (i<NR_SUPERIOS))
if (cr23 * 4 >= 0x100) { /* if active */
while ((i < NR_SUPERIOS) && (superios[i].io != 0))
i++;
if(i==NR_SUPERIOS)
if (i == NR_SUPERIOS) {
printk(KERN_INFO "Super-IO: too many chips!\n");
else {
} else {
int d;
switch (cr23*4) {
case 0x3bc:
Expand Down Expand Up @@ -1332,12 +1332,12 @@ static void __devinit show_parconfig_winbond(int io, int key)
printk(KERN_INFO "Winbond LPT Config: Port mode=%s\n", modes[crf0 & 0x07]);
}

if(cr30 & 0x01) { /* the settings can be interrogated later ... */
while((superios[i].io!= 0) && (i<NR_SUPERIOS))
if (cr30 & 0x01) { /* the settings can be interrogated later ... */
while ((i < NR_SUPERIOS) && (superios[i].io != 0))
i++;
if(i==NR_SUPERIOS)
if (i == NR_SUPERIOS) {
printk(KERN_INFO "Super-IO: too many chips!\n");
else {
} else {
superios[i].io = (cr60<<8)|cr61;
superios[i].irq = cr70&0x0f;
superios[i].dma = (((cr74 & 0x07) > 3) ?
Expand Down Expand Up @@ -1575,24 +1575,26 @@ static void __devinit detect_and_report_it87(void)

static int get_superio_dma (struct parport *p)
{
int i=0;
while( (superios[i].io != p->base) && (i<NR_SUPERIOS))
int i = 0;

while ((i < NR_SUPERIOS) && (superios[i].io != p->base))
i++;
if (i!=NR_SUPERIOS)
if (i != NR_SUPERIOS)
return superios[i].dma;
return PARPORT_DMA_NONE;
}

static int get_superio_irq (struct parport *p)
{
int i=0;
while( (superios[i].io != p->base) && (i<NR_SUPERIOS))
int i = 0;

while ((i < NR_SUPERIOS) && (superios[i].io != p->base))
i++;
if (i!=NR_SUPERIOS)
if (i != NR_SUPERIOS)
return superios[i].irq;
return PARPORT_IRQ_NONE;
}


/* --- Mode detection ------------------------------------- */

Expand Down

0 comments on commit 1e80d85

Please sign in to comment.