patch-2.4.0-test2 linux/drivers/char/amiserial.c

Next file: linux/drivers/char/atarimouse.c
Previous file: linux/drivers/char/amikeyb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/char/amiserial.c linux/drivers/char/amiserial.c
@@ -2104,6 +2104,13 @@
 	if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_SERIAL))
 		return -ENODEV;
 
+	/*
+	 *  We request SERDAT and SERPER only, because the serial registers are
+	 *  too spreaded over the custom register space
+	 */
+	if (!request_mem_region(CUSTOM_PHYSADDR+0x30, 4, "amiserial [Paula]"))
+		return -EBUSY;
+
 	init_bh(SERIAL_BH, do_serial_bh);
 
 	IRQ_ports = NULL;
@@ -2254,6 +2261,7 @@
 		free_page((unsigned long) tmp_buf);
 		tmp_buf = NULL;
 	}
+	release_mem_region(CUSTOM_PHYSADDR+0x30, 4);
 }
 #endif /* MODULE */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)