patch-2.1.36 linux/arch/m68k/amiga/cia.c

Next file: linux/arch/m68k/amiga/config.c
Previous file: linux/arch/m68k/amiga/amiints.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.35/linux/arch/m68k/amiga/cia.c linux/arch/m68k/amiga/cia.c
@@ -30,13 +30,13 @@
 	irq_handler_t irq_list[CIA_IRQS];
 } ciaa_base = {
 	&ciaa, 0, 0, IF_PORTS,
-	IRQ2, IRQ_AMIGA_CIAA,
-	IRQ_IDX(IRQ_AMIGA_PORTS),
+	IRQ_AMIGA_AUTO_2, IRQ_AMIGA_CIAA,
+	IRQ_AMIGA_PORTS,
 	"CIAA handler", {0, 0}
 }, ciab_base = {
 	&ciab, 0, 0, IF_EXTER,
-	IRQ6, IRQ_AMIGA_CIAB,
-	IRQ_IDX(IRQ_AMIGA_EXTER),
+	IRQ_AMIGA_AUTO_6, IRQ_AMIGA_CIAB,
+	IRQ_AMIGA_EXTER,
 	"CIAB handler", {0, 0}
 };
 
@@ -95,14 +95,14 @@
 
 	if (!(base->irq_list[irq].flags & IRQ_FLG_STD)) {
 		if (base->irq_list[irq].flags & IRQ_FLG_LOCK) {
-			printk("%s: IRQ %ld from %s is not replaceable\n",
-			       __FUNCTION__, IRQ_IDX(base->cia_irq + irq),
+			printk("%s: IRQ %i from %s is not replaceable\n",
+			       __FUNCTION__, base->cia_irq + irq,
 			       base->irq_list[irq].devname);
 			return -EBUSY;
 		}
-		if (flags & IRQ_FLG_REPLACE) {
-			printk("%s: %s can't replace IRQ %ld from %s\n", __FUNCTION__,
-			       devname, IRQ_IDX(base->cia_irq + irq),
+		if (!(flags & IRQ_FLG_REPLACE)) {
+			printk("%s: %s can't replace IRQ %i from %s\n", __FUNCTION__,
+			       devname, base->cia_irq + irq,
 			       base->irq_list[irq].devname);
 			return -EBUSY;
 		}
@@ -122,8 +122,8 @@
 void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id)
 {
 	if (base->irq_list[irq].dev_id != dev_id)
-		printk("%s: removing probably wrong IRQ %ld from %s\n",
-		       __FUNCTION__, IRQ_IDX(base->cia_irq + irq),
+		printk("%s: removing probably wrong IRQ %i from %s\n",
+		       __FUNCTION__, base->cia_irq + irq,
 		       base->irq_list[irq].devname);
 
 	base->irq_list[irq].handler = NULL;
@@ -139,7 +139,7 @@
 	unsigned char ints;
 
 	mach_irq = base->cia_irq;
-	irq = SYS_IRQS + IRQ_IDX(mach_irq);
+	irq = SYS_IRQS + mach_irq;
 	ints = cia_set_irq(base, CIA_ICR_ALL);
 	custom.intreq = base->int_mask;
 	for (i = 0; i < CIA_IRQS; i++, irq++, mach_irq++) {
@@ -176,7 +176,7 @@
 {
 	int i, j, len = 0;
 
-	j = IRQ_IDX(base->cia_irq);
+	j = base->cia_irq;
 	for (i = 0; i < CIA_IRQS; i++) {
 		if (!(base->irq_list[i].flags & IRQ_FLG_STD)) {
 			len += sprintf(buf+len, "cia  %2d: %10d ", j + i,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov