  	make_vbitab(btv);
  	bt848_set_risc_jmps(btv);
    
-@@ -3336,6 +3370,18 @@
+@@ -3336,6 +3378,17 @@
  		/* get device status bits */
  		dstat=btread(BT848_DSTATUS);
      
 +#ifdef BTTV_GPIOMON
-+                if ( (astat&BT848_INT_GPINT) )
++                if ( astat & BT848_INT_GPINT )
 +        	{
-+            		unsigned long b;
++            		unsigned long b; 
 +                    
 +                	b=btread(BT848_GPIO_DATA);
-+                	IDEBUG(printk("bttv%d: GPIO: %04lx INT_STAT: %04lx \n", 
++                    	IDEBUG(printk("bttv%d: GPIO: %04lx INT_STAT: %04lx \n", 
 +                    		btv->nr, b&0x1ff, (long)stat));
 +            		(gpio_monitor) ? gpio_monitor(btv->nr, b) : 0;
-+			return;
 +		}
 +#endif
  		if (astat&BT848_INT_FMTCHG) 
  		{
  			IDEBUG(printk ("bttv%d: IRQ_FMTCHG\n", btv->nr));
-@@ -3840,9 +3886,58 @@
+@@ -3840,9 +3893,17 @@
  	}
  }
  
 -#ifdef MODULE
+-
 +#ifdef BTTV_GPIOMON
 +#if LINUX_VERSION_CODE >= 0x020100
 +EXPORT_SYMBOL(bttv_set_gpio_monitor);
 +#endif
-+
-+static void setup_gpio_irq(int nr)
-+{
-+	/* Set up GPIOINT mask */
-+	struct bttv *btv;                                                       
-+  
-+	btv = &bttvs[nr];
-+	printk("bttv%d: setup_gpio_irq\n",nr);
-+	if(btv == NULL) {                                                       
-+		printk("bttv%d: setup_gpio_irq: *btv == NULL\n",nr);
-+		return;                                                         
-+	};
-+    
-+    /**/
-+	btwrite(btread(BT848_GPIO_DMA_CTL)
-+    	    |BT848_GPIO_DMA_CTL_GPINTC
-+    	    ,BT848_GPIO_DMA_CTL);
-+	btwrite(btread(BT848_GPIO_DMA_CTL)
-+	    |BT848_GPIO_DMA_CTL_GPINTI
-+	    ,BT848_GPIO_DMA_CTL);
-+	  
-+	btwrite(btread(BT848_INT_STAT)|BT848_INT_GPINT,BT848_INT_STAT);
-+	btwrite(btread(BT848_INT_MASK)|BT848_INT_GPINT,BT848_INT_MASK);
-+    /**/
-+
-+};
-+
-+static void reset_gpio_irq(int nr)
-+{
-+  /* Reset GPIOINT mask */
-+  struct bttv *btv;                                                       
-+  
-+  btv = &bttvs[nr];
-+  if(btv == NULL) {                                                       
-+    printk("bttv%d: reset_gpio_irq: *btv == NULL\n",nr);
-+    return;                                                         
-+  };
-+  btwrite(btread(BT848_INT_MASK)&(~BT848_INT_GPINT)
-+          ,BT848_INT_MASK);
-+};
- 
 +#else
  EXPORT_NO_SYMBOLS;
 +#endif

 static int init_bt848(int i)
 {
         struct bttv *btv = &bttvs[i];
@@ -3270,15 +3293,26 @@
 	btwrite(0xfffffUL, BT848_INT_STAT);
         
 	/* set interrupt mask */
+#ifdef BTTV_GPIOMON
 	btwrite(btv->triton1|
                 /*BT848_INT_PABORT|BT848_INT_RIPERR|BT848_INT_PPERR|
                   BT848_INT_FDSR|BT848_INT_FTRGT|BT848_INT_FBUS|*/

diff -u --recursive linux/drivers/char/Config.in linux-irctl/drivers/char/Config.in
--- linux/drivers/char/Config.in	Fri May  7 20:05:30 1999
+++ linux-irctl/drivers/char/Config.in	Mon Jul 26 22:14:40 1999
@@ -132,6 +132,9 @@
