Index: comedi/drivers/8255.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/8255.c,v
retrieving revision 1.30
diff -u -r1.30 8255.c
--- comedi/drivers/8255.c	14 Jan 2005 01:23:13 -0000	1.30
+++ comedi/drivers/8255.c	18 Feb 2005 12:49:25 -0000
@@ -26,7 +26,7 @@
 Devices: [standard] 8255 (8255)
 Author: ds
 Status: works
-Updated: Fri,  7 Jun 2002 12:56:45 -0700
+Updated: Fri, 18 Feb 2005 12:46:34 +0000
 
 The classic in digital I/O.  The 8255 appears in Comedi as a single
 digital I/O subdevice with 24 channels.  The channel 0 corresponds
@@ -35,6 +35,9 @@
 8-15, 16-19, and 20-23 making up the 4 blocks.  The only 8255 mode
 supported is mode 0.
 
+A quirk to be aware of is that all output channels are set to 0 during
+direction configuration.
+
 You should enable compilation this driver if you plan to use a board
 that has an 8255 chip.  For multifunction boards, the main driver will
 configure the 8255 subdevice automatically.
@@ -214,6 +217,8 @@
 	if(!(s->io_bits&0xf00000))
 		config|=CR_C_HI_IO;
 	CALLBACK_FUNC(1,_8255_CR,config,CALLBACK_ARG);
+	/* clear internal output state to match the hardware */
+	s->state=0;
 }
 
 static int subdev_8255_cmdtest(comedi_device *dev, comedi_subdevice *s,

