diff options
author | Sean Young <sean@mess.org> | 2018-08-21 22:57:52 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-10-04 21:22:27 +0300 |
commit | 183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871 (patch) | |
tree | 590ad6faa92cfc230d2a3527f585d7f4d728c217 /drivers/media/rc/winbond-cir.c | |
parent | c5f14af0d8b63a62dfde7ade372da0038507deeb (diff) | |
download | linux-183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871.tar.xz |
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/winbond-cir.c')
-rw-r--r-- | drivers/media/rc/winbond-cir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 851acba9b436..0f07a2c384fa 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -322,11 +322,11 @@ wbcir_carrier_report(struct wbcir_data *data) inb(data->ebase + WBCIR_REG_ECEIR_CNT_HI) << 8; if (counter > 0 && counter < 0xffff) { - DEFINE_IR_RAW_EVENT(ev); - - ev.carrier_report = 1; - ev.carrier = DIV_ROUND_CLOSEST(counter * 1000000u, - data->pulse_duration); + struct ir_raw_event ev = { + .carrier_report = 1, + .carrier = DIV_ROUND_CLOSEST(counter * 1000000u, + data->pulse_duration) + }; ir_raw_event_store(data->dev, &ev); } @@ -362,7 +362,7 @@ static void wbcir_irq_rx(struct wbcir_data *data, struct pnp_dev *device) { u8 irdata; - DEFINE_IR_RAW_EVENT(rawir); + struct ir_raw_event rawir = {}; unsigned duration; /* Since RXHDLEV is set, at least 8 bytes are in the FIFO */ |