aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/rc-main.c
diff options
context:
space:
mode:
authorAntti Seppälä <a.seppala@gmail.com>2011-02-13 05:29:15 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-02 11:44:40 -0500
commit0a91be40ed67ca72a81cfd842d5c2604ff1a54a4 (patch)
treefba44f43dd9df467e87e11e5f001256f4a100693 /drivers/media/rc/rc-main.c
parent54ebb8b83f2be99413261c8ba8238b390159a026 (diff)
[media] Fix sysfs rc protocol lookup for rc-5-sz
With the current matching rules the lookup for rc protocol named rc-5-sz matches with "rc-5" before finding "rc-5-sz". Thus one is able to never enable/disable the rc-5-sz protocol via sysfs. Fix the lookup to require an exact match which allows the manipulation of sz protocol. Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/rc-main.c')
-rw-r--r--drivers/media/rc/rc-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 72be8a02118c..e5b29a4c691e 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -844,7 +844,7 @@ static ssize_t store_protocols(struct device *device,
844 count++; 844 count++;
845 } else { 845 } else {
846 for (i = 0; i < ARRAY_SIZE(proto_names); i++) { 846 for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
847 if (!strncasecmp(tmp, proto_names[i].name, strlen(proto_names[i].name))) { 847 if (!strcasecmp(tmp, proto_names[i].name)) {
848 tmp += strlen(proto_names[i].name); 848 tmp += strlen(proto_names[i].name);
849 mask = proto_names[i].type; 849 mask = proto_names[i].type;
850 break; 850 break;