Commit e7a08ffb authored by Sean Young's avatar Sean Young Committed by Greg Kroah-Hartman

Revert "media: lirc_zilog: driver only sends LIRCCODE"

[not upstream as the driver is deleted in 4.16 - gregkh]

The lirc config documented here
https://www.blushingpenguin.com/mark/blog/?p=24 uses raw_codes for sending
IR. Each key only has one pulse, which in fact is an index into the
haup-ir-blaster.bin file. Changing the driver to LIRCCODE (although more
accurate) breaks this configuration.

This code has been replaced completely in kernel v4.16 by a new driver,
see commit acaa34bf ("media: rc: implement zilog transmitter"), and
commit f95367a7 ("media: staging: remove lirc_zilog driver").

This reverts commit 89d8a2cc.

Fixes: 615cd3fe ("[media] media: lirc_dev: make better use of file->private_data")

Cc: stable@vger.kernel.org # v4.14-v4.15
Reported-by: default avatarWarren Sturm <warren.sturm@gmail.com>
Tested-by: default avatarWarren Sturm <warren.sturm@gmail.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8caa4c5f
......@@ -288,7 +288,7 @@ static void release_ir_tx(struct kref *ref)
struct IR_tx *tx = container_of(ref, struct IR_tx, ref);
struct IR *ir = tx->ir;
ir->l.features &= ~LIRC_CAN_SEND_LIRCCODE;
ir->l.features &= ~LIRC_CAN_SEND_PULSE;
/* Don't put_ir_device(tx->ir) here, so our lock doesn't get freed */
ir->tx = NULL;
kfree(tx);
......@@ -1267,14 +1267,14 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
if (!(features & LIRC_CAN_SEND_MASK))
return -ENOTTY;
result = put_user(LIRC_MODE_LIRCCODE, uptr);
result = put_user(LIRC_MODE_PULSE, uptr);
break;
case LIRC_SET_SEND_MODE:
if (!(features & LIRC_CAN_SEND_MASK))
return -ENOTTY;
result = get_user(mode, uptr);
if (!result && mode != LIRC_MODE_LIRCCODE)
if (!result && mode != LIRC_MODE_PULSE)
return -EINVAL;
break;
default:
......@@ -1512,7 +1512,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
kref_init(&tx->ref);
ir->tx = tx;
ir->l.features |= LIRC_CAN_SEND_LIRCCODE;
ir->l.features |= LIRC_CAN_SEND_PULSE;
mutex_init(&tx->client_lock);
tx->c = client;
tx->need_boot = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment