patch-2.4.19 linux-2.4.19/drivers/s390/misc/chandev.c

Next file: linux-2.4.19/drivers/s390/net/Makefile
Previous file: linux-2.4.19/drivers/s390/char/tubtty.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/s390/misc/chandev.c linux-2.4.19/drivers/s390/misc/chandev.c
@@ -902,25 +902,6 @@
 		       (int)lo_devno,(int)hi_devno);
 		return;
 	}
-	chandev_lock();
-	for_each(parms,chandev_parms_head)
-	{
-		if(chan_type&(parms->chan_type))
-		{
-			u16 lomax=MAX(parms->lo_devno,lo_devno),
-				himin=MIN(parms->hi_devno,lo_devno);
-			if(lomax<=himin)
-			{
-				chandev_unlock();
-				printk("chandev_add_parms detected overlapping "
-				       "parameter definitions for chan_type=0x%02x"
-				       " lo_devno=0x%04x  hi_devno=0x%04x\n,"
-				       " do a del_parms.",chan_type,(int)lo_devno,(int)hi_devno);
-				return;
-			}
-		}
-	}
-	chandev_unlock();
 	if((parms=chandev_allocstr(parmstr,offsetof(chandev_parms,parmstr))))
 	{
 		parms->chan_type=chan_type;
@@ -1727,8 +1708,16 @@
 				   read->sch.devno>=curr_parms->lo_devno&&
 					read->sch.devno<=curr_parms->hi_devno)
 				{
-					probeinfo.parmstr=curr_parms->parmstr;
-					break;
+					if (!probeinfo.parmstr) {
+						probeinfo.parmstr = vmalloc(sizeof(curr_parms->parmstr)+1);
+						strcpy(probeinfo.parmstr, curr_parms->parmstr);
+					} else {
+						char *buf;
+
+						buf = vmalloc(strlen(probeinfo.parmstr)+strlen(curr_parms->parmstr)+2);
+						sprintf(buf, "%s,%s",probeinfo.parmstr, curr_parms->parmstr);
+						probeinfo.parmstr=buf;
+					}
 				}
 			}
 			if(force)
@@ -2024,7 +2013,7 @@
 		/* This is required because the device can go & come back */
                 /* even before we realize it is gone owing to the waits in our kernel threads */
 		/* & the device will be marked as not owned but its status will be good */
-                /* & an attempt to accidently reprobe it may be done. */ 
+                /* & an attempt to accidentally reprobe it may be done. */ 
 		remove:
 		chandev_remove(chandev_get_by_irq(curr_irqinfo->sch.irq));
 		

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