Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1508959
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv6 08/11] i2c: match vendorless strings on the internal string length |
| Date | 2016-10-26 11:00 +0200 |
| Message-ID | <swsdY-1ge-47@gated-at.bofh.it> (permalink) |
| References | <swd5f-8aC-3@gated-at.bofh.it> <swd5g-8aC-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 25 Oct 2016, Kieran Bingham wrote: > If a user provides a shortened string to match a device to the sysfs i2c > interface it will match on the first string that contains that string > prefix. > > for example: > echo a 0x68 > /sys/bus/i2c/devices/i2c-2/new_device > > will match as3711, as3722, and ak8975 incorrectly. > > Signed-off-by: Kieran Bingham <kieran@bingham.xyz> Acked-by: Lee Jones <lee.jones@linaro.org> > --- > drivers/i2c/i2c-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > index 01bce56f733a..50c9cfdb87b7 100644 > --- a/drivers/i2c/i2c-core.c > +++ b/drivers/i2c/i2c-core.c > @@ -1708,7 +1708,7 @@ i2c_of_match_device_strip_vendor(const struct of_device_id *matches, > else > name++; > > - if (!strncasecmp(client->name, name, strlen(client->name))) > + if (!strncasecmp(client->name, name, strlen(name))) > return matches; > } > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv6 08/11] i2c: match vendorless strings on the internal string length Kieran Bingham <kieran@ksquared.org.uk> - 2016-10-25 18:50 +0200 Re: [PATCHv6 08/11] i2c: match vendorless strings on the internal string length Lee Jones <lee.jones@linaro.org> - 2016-10-26 11:00 +0200
csiph-web