Commit 67cdd42e authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab

[media] rc-core: int to bool conversion for winbond-cir

Using bool instead of an int helps readability a bit.
Signed-off-by: default avatarDavid Härdeman <david@hardeman.nu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0f2ce168
...@@ -382,7 +382,7 @@ wbcir_shutdown(struct pnp_dev *device) ...@@ -382,7 +382,7 @@ wbcir_shutdown(struct pnp_dev *device)
{ {
struct device *dev = &device->dev; struct device *dev = &device->dev;
struct wbcir_data *data = pnp_get_drvdata(device); struct wbcir_data *data = pnp_get_drvdata(device);
int do_wake = 1; bool do_wake = true;
u8 match[11]; u8 match[11];
u8 mask[11]; u8 mask[11];
u8 rc6_csl = 0; u8 rc6_csl = 0;
...@@ -392,14 +392,14 @@ wbcir_shutdown(struct pnp_dev *device) ...@@ -392,14 +392,14 @@ wbcir_shutdown(struct pnp_dev *device)
memset(mask, 0, sizeof(mask)); memset(mask, 0, sizeof(mask));
if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) { if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) {
do_wake = 0; do_wake = false;
goto finish; goto finish;
} }
switch (protocol) { switch (protocol) {
case IR_PROTOCOL_RC5: case IR_PROTOCOL_RC5:
if (wake_sc > 0xFFF) { if (wake_sc > 0xFFF) {
do_wake = 0; do_wake = false;
dev_err(dev, "RC5 - Invalid wake scancode\n"); dev_err(dev, "RC5 - Invalid wake scancode\n");
break; break;
} }
...@@ -418,7 +418,7 @@ wbcir_shutdown(struct pnp_dev *device) ...@@ -418,7 +418,7 @@ wbcir_shutdown(struct pnp_dev *device)
case IR_PROTOCOL_NEC: case IR_PROTOCOL_NEC:
if (wake_sc > 0xFFFFFF) { if (wake_sc > 0xFFFFFF) {
do_wake = 0; do_wake = false;
dev_err(dev, "NEC - Invalid wake scancode\n"); dev_err(dev, "NEC - Invalid wake scancode\n");
break; break;
} }
...@@ -440,7 +440,7 @@ wbcir_shutdown(struct pnp_dev *device) ...@@ -440,7 +440,7 @@ wbcir_shutdown(struct pnp_dev *device)
if (wake_rc6mode == 0) { if (wake_rc6mode == 0) {
if (wake_sc > 0xFFFF) { if (wake_sc > 0xFFFF) {
do_wake = 0; do_wake = false;
dev_err(dev, "RC6 - Invalid wake scancode\n"); dev_err(dev, "RC6 - Invalid wake scancode\n");
break; break;
} }
...@@ -496,7 +496,7 @@ wbcir_shutdown(struct pnp_dev *device) ...@@ -496,7 +496,7 @@ wbcir_shutdown(struct pnp_dev *device)
} else if (wake_sc <= 0x007FFFFF) { } else if (wake_sc <= 0x007FFFFF) {
rc6_csl = 60; rc6_csl = 60;
} else { } else {
do_wake = 0; do_wake = false;
dev_err(dev, "RC6 - Invalid wake scancode\n"); dev_err(dev, "RC6 - Invalid wake scancode\n");
break; break;
} }
...@@ -508,14 +508,14 @@ wbcir_shutdown(struct pnp_dev *device) ...@@ -508,14 +508,14 @@ wbcir_shutdown(struct pnp_dev *device)
mask[i++] = 0x0F; mask[i++] = 0x0F;
} else { } else {
do_wake = 0; do_wake = false;
dev_err(dev, "RC6 - Invalid wake mode\n"); dev_err(dev, "RC6 - Invalid wake mode\n");
} }
break; break;
default: default:
do_wake = 0; do_wake = false;
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