Commit e3ffd6b0 authored by William Stinson's avatar William Stinson Committed by Linus Torvalds

[PATCH] remove check_region calls from drivers_telephony_ixj.c

  This patch for driver drivers/telephony/ixj.c for Linux removes four
  calls to check_region using request_region instead.

  I don't have this hardware so I hope I got it right.  This patch
  removes all but one reference to check_region in this driver.

  This is patch number 21 in a series of check_region patches I am doing as
  part of the kernel janitors project.
parent 52d4c98e
...@@ -6906,21 +6906,19 @@ static int ixj_selfprobe(IXJ *j) ...@@ -6906,21 +6906,19 @@ static int ixj_selfprobe(IXJ *j)
/* Internet PhoneJack Lite */ /* Internet PhoneJack Lite */
{ {
j->cardtype = QTI_PHONEJACK_LITE; j->cardtype = QTI_PHONEJACK_LITE;
if (check_region(j->XILINXbase, 4)) { if (!request_region(j->XILINXbase, 4, "ixj control")) {
printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase); printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
return -1; return -1;
} }
request_region(j->XILINXbase, 4, "ixj control");
j->pld_slicw.pcib.e1 = 1; j->pld_slicw.pcib.e1 = 1;
outb_p(j->pld_slicw.byte, j->XILINXbase); outb_p(j->pld_slicw.byte, j->XILINXbase);
} else { } else {
j->cardtype = QTI_LINEJACK; j->cardtype = QTI_LINEJACK;
if (check_region(j->XILINXbase, 8)) { if (!request_region(j->XILINXbase, 8, "ixj control")) {
printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase); printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
return -1; return -1;
} }
request_region(j->XILINXbase, 8, "ixj control");
} }
} else if (j->dsp.low == 0x22) { } else if (j->dsp.low == 0x22) {
j->cardtype = QTI_PHONEJACK_PCI; j->cardtype = QTI_PHONEJACK_PCI;
...@@ -6941,19 +6939,17 @@ static int ixj_selfprobe(IXJ *j) ...@@ -6941,19 +6939,17 @@ static int ixj_selfprobe(IXJ *j)
} }
break; break;
case QTI_LINEJACK: case QTI_LINEJACK:
if (check_region(j->XILINXbase, 8)) { if (!request_region(j->XILINXbase, 8, "ixj control")) {
printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase); printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
return -1; return -1;
} }
request_region(j->XILINXbase, 8, "ixj control");
break; break;
case QTI_PHONEJACK_LITE: case QTI_PHONEJACK_LITE:
case QTI_PHONEJACK_PCI: case QTI_PHONEJACK_PCI:
if (check_region(j->XILINXbase, 4)) { if (!request_region(j->XILINXbase, 4, "ixj control")) {
printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase); printk(KERN_INFO "ixj: can't get I/O address 0x%x\n", j->XILINXbase);
return -1; return -1;
} }
request_region(j->XILINXbase, 4, "ixj control");
j->pld_slicw.pcib.e1 = 1; j->pld_slicw.pcib.e1 = 1;
outb_p(j->pld_slicw.byte, j->XILINXbase); outb_p(j->pld_slicw.byte, j->XILINXbase);
break; break;
......
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