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 cafa0010cd
("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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
c5f14af0d8
commit
183e19f5b9
@@ -273,7 +273,7 @@ static void frbwrite(unsigned int l, bool is_pulse)
|
||||
{
|
||||
/* simple noise filter */
|
||||
static unsigned int ptr, pulse, space;
|
||||
DEFINE_IR_RAW_EVENT(ev);
|
||||
struct ir_raw_event ev = {};
|
||||
|
||||
if (ptr > 0 && is_pulse) {
|
||||
pulse += l;
|
||||
@@ -472,10 +472,10 @@ static int hardware_init_port(void)
|
||||
|
||||
static void serial_ir_timeout(struct timer_list *unused)
|
||||
{
|
||||
DEFINE_IR_RAW_EVENT(ev);
|
||||
|
||||
ev.timeout = true;
|
||||
ev.duration = serial_ir.rcdev->timeout;
|
||||
struct ir_raw_event ev = {
|
||||
.timeout = true,
|
||||
.duration = serial_ir.rcdev->timeout
|
||||
};
|
||||
ir_raw_event_store_with_filter(serial_ir.rcdev, &ev);
|
||||
ir_raw_event_handle(serial_ir.rcdev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user