small ISDN fixes

From: Karsten Keil
Date: Tue Mar 02 2004 - 09:10:22 EST


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).


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
--- linux-2.6.4-rc1-bk2.org/drivers/isdn/hisax/hisax_fcpcipnp.c 2004-03-02 11:24:21.000000000 +0100
+++ linux-2.6.4-rc1-bk2.clean/drivers/isdn/hisax/hisax_fcpcipnp.c 2004-03-02 13:46:14.000000000 +0100
@@ -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)
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
--- linux-2.6.4-rc1-bk2.org/drivers/isdn/icn/icn.c 2003-12-18 03:59:59.000000000 +0100
+++ linux-2.6.4-rc1-bk2.clean/drivers/isdn/icn/icn.c 2004-03-02 13:18:59.000000000 +0100
@@ -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;
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
--- linux-2.6.4-rc1-bk2.org/drivers/isdn/isdnloop/isdnloop.c 2003-12-18 03:57:58.000000000 +0100
+++ linux-2.6.4-rc1-bk2.clean/drivers/isdn/isdnloop/isdnloop.c 2004-03-02 13:20:06.000000000 +0100
@@ -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;

--
Karsten Keil
SuSE Labs
ISDN development
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/