Skip to content

Commit e7a08ff

Browse files
seanyounggregkh
authored andcommitted
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 acaa34b ("media: rc: implement zilog transmitter"), and commit f95367a ("media: staging: remove lirc_zilog driver"). This reverts commit 89d8a2c. Fixes: 615cd3f ("[media] media: lirc_dev: make better use of file->private_data") Cc: [email protected] # v4.14-v4.15 Reported-by: Warren Sturm <[email protected]> Tested-by: Warren Sturm <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8caa4c5 commit e7a08ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/staging/media/lirc/lirc_zilog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static void release_ir_tx(struct kref *ref)
288288
struct IR_tx *tx = container_of(ref, struct IR_tx, ref);
289289
struct IR *ir = tx->ir;
290290

291-
ir->l.features &= ~LIRC_CAN_SEND_LIRCCODE;
291+
ir->l.features &= ~LIRC_CAN_SEND_PULSE;
292292
/* Don't put_ir_device(tx->ir) here, so our lock doesn't get freed */
293293
ir->tx = NULL;
294294
kfree(tx);
@@ -1267,14 +1267,14 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
12671267
if (!(features & LIRC_CAN_SEND_MASK))
12681268
return -ENOTTY;
12691269

1270-
result = put_user(LIRC_MODE_LIRCCODE, uptr);
1270+
result = put_user(LIRC_MODE_PULSE, uptr);
12711271
break;
12721272
case LIRC_SET_SEND_MODE:
12731273
if (!(features & LIRC_CAN_SEND_MASK))
12741274
return -ENOTTY;
12751275

12761276
result = get_user(mode, uptr);
1277-
if (!result && mode != LIRC_MODE_LIRCCODE)
1277+
if (!result && mode != LIRC_MODE_PULSE)
12781278
return -EINVAL;
12791279
break;
12801280
default:
@@ -1512,7 +1512,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
15121512
kref_init(&tx->ref);
15131513
ir->tx = tx;
15141514

1515-
ir->l.features |= LIRC_CAN_SEND_LIRCCODE;
1515+
ir->l.features |= LIRC_CAN_SEND_PULSE;
15161516
mutex_init(&tx->client_lock);
15171517
tx->c = client;
15181518
tx->need_boot = 1;

0 commit comments

Comments
 (0)