patch-2.1.96 linux/drivers/misc/parport_share.c
Next file: linux/drivers/scsi/53c7,8xx.c
Previous file: linux/drivers/misc/parport_pc.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Sun Apr 12 11:39:20 1998
- Orig file:
v2.1.95/linux/drivers/misc/parport_share.c
- Orig date:
Thu Mar 26 15:57:03 1998
diff -u --recursive --new-file v2.1.95/linux/drivers/misc/parport_share.c linux/drivers/misc/parport_share.c
@@ -441,3 +441,26 @@
pd->wakeup(pd->private);
}
}
+
+void parport_parse_irqs(int nports, const char *irqstr, int irqval[])
+{
+ unsigned int i;
+ for (i = 0; i < nports && irqstr; i++) {
+ if (!strncmp(irqstr, "auto", 4))
+ irqval[i] = PARPORT_IRQ_AUTO;
+ else if (!strncmp(irqstr, "none", 4))
+ irqval[i] = PARPORT_IRQ_NONE;
+ else {
+ char *ep;
+ unsigned long r = simple_strtoul(irqstr, &ep, 0);
+ if (ep != irqstr)
+ irqval[i] = r;
+ else {
+ printk("parport: bad irq specifier `%s'\n", irqstr);
+ return;
+ }
+ }
+ irqstr = strchr(irqstr, ',');
+ if (irqstr) irqstr++;
+ }
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov