patch-2.3.4 linux/drivers/net/irda/uircc.c

Next file: linux/drivers/net/irda/w83977af_ir.c
Previous file: linux/drivers/net/irda/toshoboe.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/drivers/net/irda/uircc.c linux/drivers/net/irda/uircc.c
@@ -7,10 +7,10 @@
  * Status:        Experimental.
  * Author:        Dag Brattli <dagb@cs.uit.no>
  * Created at:    Sat Dec 26 10:59:03 1998
- * Modified at:   Tue Apr 20 11:15:52 1999
+ * Modified at:   Mon May 10 22:11:09 1999
  * Modified by:   Dag Brattli <dagb@cs.uit.no>
  * 
- *     Copyright (c) 1998 Dag Brattli, All Rights Reserved.
+ *     Copyright (c) 1998-1999 Dag Brattli, All Rights Reserved.
  *      
  *     This program is free software; you can redistribute it and/or 
  *     modify it under the terms of the GNU General Public License as 
@@ -216,7 +216,7 @@
 	idev->netdev.open            = uircc_net_open;
 	idev->netdev.stop            = uircc_net_close;
 
-	irport_open(iobase2);
+	irport_start(iobase2);
 
 	/* Open the IrDA device */
 	irda_device_open(idev, driver_name, self);
@@ -233,6 +233,7 @@
 #ifdef MODULE
 static int uircc_close(struct irda_device *idev)
 {
+	struct uircc_cb *self;
 	int iobase;
 	int status;
 
@@ -242,6 +243,7 @@
 	ASSERT(idev->magic == IRDA_DEVICE_MAGIC, return -1;);
 
         iobase = idev->io.iobase;
+	self = (struct uircc_cb *) idev->priv;
 
 	/* Some magic to disable FIR and enable SIR */
 	uircc_toshiba_cmd(&status, 0xffff, 0x001b, 0x0000);
@@ -249,7 +251,7 @@
 	/* Disable modem */
 	outb(0x00, iobase+UIRCC_CR10);
 
-	irport_close(idev->io.iobase2);
+	irport_stop(idev->io.iobase2);
 
 	/* Release the PORT that this driver is using */
 	DEBUG(4, __FUNCTION__ "(), Releasing Region %03x\n", idev->io.iobase);
@@ -262,6 +264,8 @@
 	}
 	irda_device_close(idev);
 
+	kfree(self);
+
 	return 0;
 }
 #endif /* MODULE */
@@ -346,8 +350,8 @@
 	case 37600:
 	case 57600:
 	case 115200:
- 		irport_open(idev->io.iobase2);
-		irport_change_speed( idev->io.iobase2, speed);
+ 		irport_start(idev->io.iobase2);
+		irport_change_speed(idev, speed);
 
 		/* Some magic to disable FIR and enable SIR */
 		uircc_toshiba_cmd(&status, 0xffff, 0x001b, 0x0000);
@@ -363,7 +367,7 @@
 		DEBUG(0, __FUNCTION__ "(), handling baud of 1152000\n");
 		break;
 	case 4000000:
-		irport_close(idev->io.iobase2);
+		irport_stop(idev->io.iobase2);
 
 		/* Some magic to disable SIR and enable FIR */
 		uircc_toshiba_cmd(&status, 0xffff, 0x001b, 0x0001);

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