lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 26 Oct 2014 21:33:19 +0200 From: Tomas Melin <tomas.melin@....fi> To: David Härdeman <david@...deman.nu> Cc: LKML <linux-kernel@...r.kernel.org>, linux-media@...r.kernel.org, Tomas Melin <tomas.melin@....fi>, james.hogan@...tec.com, Antti Seppälä <a.seppala@...il.com>, Александр Берсенев <bay@...kerdom.ru>, Mauro Carvalho Chehab <m.chehab@...sung.com> Subject: Re: [PATCH v2 1/2] [media] rc-core: fix protocol_change regression in ir_raw_event_register On Sat, Oct 25, 2014 at 12:03 PM, David Härdeman <david@...deman.nu> wrote: > Wouldn't something like this be a simpler way of achieving the same > result? (untested): The idea was to remove the empty change_protocol function that had been added in the breaking commit. IMHO, it would be better to not have functions that don't do anything. Actually, another problem with that empty function is that if the driver first sets up a "real" change_protocol function and related data, and then calls rc_register_device, the driver defined change_protocol function would be overwritten. > diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c > index a7991c7..d521f20 100644 > --- a/drivers/media/rc/rc-main.c > +++ b/drivers/media/rc/rc-main.c > @@ -1421,6 +1421,9 @@ int rc_register_device(struct rc_dev *dev) > > if (dev->change_protocol) { > u64 rc_type = (1 << rc_map->rc_type); > + if (dev->driver_type == RC_DRIVER_IR_RAW) > + rc_type |= RC_BIT_LIRC; > + > rc = dev->change_protocol(dev, &rc_type); > if (rc < 0) > goto out_raw; But otherwise yes, your suggestion could work, with the addition that we still need to update enabled_protocols (and not init enabled_protocols anymore in ir_raw_event_register() ). + dev->enabled_protocols = (rc_type | RC_BIT_LIRC); Please let me know your preferences on which you prefer, and, if needed, I'll make a new patch version. Tomas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists