Commit acd49735 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] pulse8-cec: set all_device_types when restoring config

When the persistent state is restored, the all_device_types field
was never filled in. Fix this.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 9f750b2b
...@@ -375,27 +375,35 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio, ...@@ -375,27 +375,35 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
switch (log_addrs->primary_device_type[0]) { switch (log_addrs->primary_device_type[0]) {
case CEC_OP_PRIM_DEVTYPE_TV: case CEC_OP_PRIM_DEVTYPE_TV:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_TV; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_TV;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_TV;
break; break;
case CEC_OP_PRIM_DEVTYPE_RECORD: case CEC_OP_PRIM_DEVTYPE_RECORD:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_RECORD; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_RECORD;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_RECORD;
break; break;
case CEC_OP_PRIM_DEVTYPE_TUNER: case CEC_OP_PRIM_DEVTYPE_TUNER:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_TUNER; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_TUNER;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_TUNER;
break; break;
case CEC_OP_PRIM_DEVTYPE_PLAYBACK: case CEC_OP_PRIM_DEVTYPE_PLAYBACK:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_PLAYBACK; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_PLAYBACK;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_PLAYBACK;
break; break;
case CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM: case CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_PLAYBACK; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_PLAYBACK;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM;
break; break;
case CEC_OP_PRIM_DEVTYPE_SWITCH: case CEC_OP_PRIM_DEVTYPE_SWITCH:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_UNREGISTERED; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_UNREGISTERED;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_SWITCH;
break; break;
case CEC_OP_PRIM_DEVTYPE_PROCESSOR: case CEC_OP_PRIM_DEVTYPE_PROCESSOR:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_SPECIFIC; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_SPECIFIC;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_SWITCH;
break; break;
default: default:
log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_UNREGISTERED; log_addrs->log_addr_type[0] = CEC_LOG_ADDR_TYPE_UNREGISTERED;
log_addrs->all_device_types[0] = CEC_OP_ALL_DEVTYPE_SWITCH;
dev_info(pulse8->dev, "Unknown Primary Device Type: %d\n", dev_info(pulse8->dev, "Unknown Primary Device Type: %d\n",
log_addrs->primary_device_type[0]); log_addrs->primary_device_type[0]);
break; break;
......
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