Message ID | 1410900696-6481-16-git-send-email-linux@rasmusvillemoes.dk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Sep 16, 2014 at 10:51:29PM +0200, Rasmus Villemoes wrote: > The kernel used to contain two functions for length-delimited, > case-insensitive string comparison, strnicmp with correct semantics > and a slightly buggy strncasecmp. The latter is the POSIX name, so > strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper > for the new strncasecmp to avoid breaking existing users. > > To allow the compat wrapper strnicmp to be removed at some point in > the future, and to avoid the extra indirection cost, do > s/strnicmp/strncasecmp/g. > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> > Cc: linux-input@vger.kernel.org > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Applied, thank you.
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 8857d5b..ee3434f 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -812,7 +812,7 @@ static int edt_ft5x06_ts_identify(struct i2c_client *client, /* if we find something consistent, stay with that assumption * at least M09 won't send 3 bytes here */ - if (!(strnicmp(rdbuf + 1, "EP0", 3))) { + if (!(strncasecmp(rdbuf + 1, "EP0", 3))) { tsdata->version = M06; /* remove last '$' end marker */
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> --- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)