patch-2.4.0-test2 linux/drivers/parport/daisy.c

Next file: linux/drivers/parport/parport_amiga.c
Previous file: linux/drivers/parport/TODO-parport
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/drivers/parport/daisy.c linux/drivers/parport/daisy.c
@@ -428,6 +428,7 @@
 	unsigned char s, last_dev;
 	unsigned char daisy;
 	int thisdev = numdevs;
+	int detected;
 	char *deviceid;
 
 	parport_data_forward (port);
@@ -484,8 +485,9 @@
 	}
 
 	parport_write_data (port, 0xff); udelay (2);
+	detected = numdevs - thisdev;
 	DPRINTK (KERN_DEBUG "%s: Found %d daisy-chained devices\n", port->name,
-		numdevs - thisdev);
+		 detected);
 
 	/* Ask the new devices to introduce themselves. */
 	deviceid = kmalloc (1000, GFP_KERNEL);
@@ -495,7 +497,7 @@
 		parport_device_id (thisdev, deviceid, 1000);
 
 	kfree (deviceid);
-	return numdevs - thisdev;
+	return detected;
 }
 
 /* Find a device with a particular manufacturer and model string,

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