Skip to contentSkip to conversation

small ISDN fixes

PATCH Karsten Keil 1 participant 1 message Mar 2, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

here are small ISDN fixes for the 2.6.4-rc1-bk2 tree.

The first one is only a C99 versus GNU style initializer change for newer compiler happiness (Thanks to Art Haas) (Andrew this one is allready in your tree).

The other fix a compiler inlining/optimation problem with strpbrk, if it has only a one character search string. (result on missing strchr because the compiler internaly replace strpbrk with strchr in this case, but after inline handling stage).

drivers/isdn/hisax/hisax_fcpcipnp.c +8 -8
diff -ur linux-2.6.4-rc1-bk2.org/drivers/isdn/hisax/hisax_fcpcipnp.c linux-2.6.4-rc1-bk2.clean/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -971,10 +971,10 @@
 }
 
 static struct pnp_driver fcpnp_driver = {
-	name:     "fcpnp",
-	probe:    fcpnp_probe,
-	remove:   __devexit_p(fcpnp_remove),
-	id_table: fcpnp_ids,
+	.name		= "fcpnp",
+	.probe		= fcpnp_probe,
+	.remove		= __devexit_p(fcpnp_remove),
+	.id_table	= fcpnp_ids,
 };
 #endif
 
@@ -988,10 +988,10 @@
 }
 
 static struct pci_driver fcpci_driver = {
-	name:     "fcpci",
-	probe:    fcpci_probe,
-	remove:   __devexit_p(fcpci_remove),
-	id_table: fcpci_ids,
+	.name		= "fcpci",
+	.probe		= fcpci_probe,
+	.remove		= __devexit_p(fcpci_remove),
+	.id_table	= fcpci_ids,
 };
 
 static int __init hisax_fcpcipnp_init(void)
drivers/isdn/icn/icn.c +3 -3
diff -ur linux-2.6.4-rc1-bk2.org/drivers/isdn/icn/icn.c linux-2.6.4-rc1-bk2.clean/drivers/isdn/icn/icn.c
@@ -504,19 +504,19 @@
 		case 3:
 			{
 				char *t = status + 6;
-				char *s = strpbrk(t, ",");
+				char *s = strchr(t, ',');
 
 				*s++ = '\0';
 				strlcpy(cmd.parm.setup.phone, t,
 					sizeof(cmd.parm.setup.phone));
-				s = strpbrk(t = s, ",");
+				s = strchr(t = s, ',');
 				*s++ = '\0';
 				if (!strlen(t))
 					cmd.parm.setup.si1 = 0;
 				else
 					cmd.parm.setup.si1 =
 					    simple_strtoul(t, NULL, 10);
-				s = strpbrk(t = s, ",");
+				s = strchr(t = s, ',');
 				*s++ = '\0';
 				if (!strlen(t))
 					cmd.parm.setup.si2 = 0;
drivers/isdn/isdnloop/isdnloop.c +3 -3
diff -ur linux-2.6.4-rc1-bk2.org/drivers/isdn/isdnloop/isdnloop.c linux-2.6.4-rc1-bk2.clean/drivers/isdn/isdnloop/isdnloop.c
@@ -122,17 +122,17 @@
 isdnloop_parse_setup(char *setup, isdn_ctrl * cmd)
 {
 	char *t = setup;
-	char *s = strpbrk(t, ",");
+	char *s = strchr(t, ',');
 
 	*s++ = '\0';
 	strlcpy(cmd->parm.setup.phone, t, sizeof(cmd->parm.setup.phone));
-	s = strpbrk(t = s, ",");
+	s = strchr(t = s, ',');
 	*s++ = '\0';
 	if (!strlen(t))
 		cmd->parm.setup.si1 = 0;
 	else
 		cmd->parm.setup.si1 = simple_strtoul(t, NULL, 10);
-	s = strpbrk(t = s, ",");
+	s = strchr(t = s, ',');
 	*s++ = '\0';
 	if (!strlen(t))
 		cmd->parm.setup.si2 = 0;
Signature · 3 lines
Karsten Keil
SuSE Labs
ISDN development