aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/st_rc.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-08-21 15:57:52 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-10-04 14:22:27 -0400
commit183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871 (patch)
tree590ad6faa92cfc230d2a3527f585d7f4d728c217 /drivers/media/rc/st_rc.c
parentmedia: rc: nec keymaps should specify the nec variant they use (diff)
downloadlinux-dev-183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871.tar.xz
linux-dev-183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871.zip
media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macros
This can be done with c99 initializers, which makes the code cleaner and more transparent. It does require gcc 4.6, because of this bug in earlier versions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Since commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"), this is the case. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/rc/st_rc.c')
-rw-r--r--drivers/media/rc/st_rc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index c855b177103c..15de3ae166a2 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -67,8 +67,7 @@ struct st_rc_device {
static void st_rc_send_lirc_timeout(struct rc_dev *rdev)
{
- DEFINE_IR_RAW_EVENT(ev);
- ev.timeout = true;
+ struct ir_raw_event ev = { .timeout = true, .duration = rdev->timeout };
ir_raw_event_store(rdev, &ev);
}
@@ -101,7 +100,7 @@ static irqreturn_t st_rc_rx_interrupt(int irq, void *data)
struct st_rc_device *dev = data;
int last_symbol = 0;
u32 status, int_status;
- DEFINE_IR_RAW_EVENT(ev);
+ struct ir_raw_event ev = {};
if (dev->irq_wake)
pm_wakeup_event(dev->dev, 0);