summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/rc/rc-main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index dfceeb4e34a8..a7991c7d010a 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -859,10 +859,9 @@ static ssize_t show_protocols(struct device *device,
if (fattr->type == RC_FILTER_NORMAL) {
enabled = dev->enabled_protocols;
- if (dev->raw)
+ allowed = dev->allowed_protocols;
+ if (dev->raw && !allowed)
allowed = ir_raw_get_allowed_protocols();
- else
- allowed = dev->allowed_protocols;
} else {
enabled = dev->enabled_wakeup_protocols;
allowed = dev->allowed_wakeup_protocols;