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:

committad av
Mauro Carvalho Chehab

förälder
c5f14af0d8
incheckning
183e19f5b9
@@ -113,7 +113,7 @@ static int au8522_rc_andor(struct au0828_rc *ir, u16 reg, u8 mask, u8 value)
|
||||
static int au0828_get_key_au8522(struct au0828_rc *ir)
|
||||
{
|
||||
unsigned char buf[40];
|
||||
DEFINE_IR_RAW_EVENT(rawir);
|
||||
struct ir_raw_event rawir = {};
|
||||
int i, j, rc;
|
||||
int prv_bit, bit, width;
|
||||
bool first = true;
|
||||
@@ -167,7 +167,6 @@ static int au0828_get_key_au8522(struct au0828_rc *ir)
|
||||
if (first) {
|
||||
first = false;
|
||||
|
||||
init_ir_raw_event(&rawir);
|
||||
rawir.pulse = true;
|
||||
if (width > NEC_START_SPACE - 2 &&
|
||||
width < NEC_START_SPACE + 2) {
|
||||
@@ -186,7 +185,6 @@ static int au0828_get_key_au8522(struct au0828_rc *ir)
|
||||
ir_raw_event_store(ir->rc, &rawir);
|
||||
}
|
||||
|
||||
init_ir_raw_event(&rawir);
|
||||
rawir.pulse = prv_bit ? false : true;
|
||||
rawir.duration = AU8522_UNIT * width;
|
||||
dprintk(16, "Storing %s with duration %d",
|
||||
@@ -199,7 +197,6 @@ static int au0828_get_key_au8522(struct au0828_rc *ir)
|
||||
}
|
||||
}
|
||||
|
||||
init_ir_raw_event(&rawir);
|
||||
rawir.pulse = prv_bit ? false : true;
|
||||
rawir.duration = AU8522_UNIT * width;
|
||||
dprintk(16, "Storing end %s with duration %d",
|
||||
|
@@ -1685,7 +1685,7 @@ static int rtl2832u_rc_query(struct dvb_usb_device *d)
|
||||
{
|
||||
int ret, i, len;
|
||||
struct rtl28xxu_dev *dev = d->priv;
|
||||
struct ir_raw_event ev;
|
||||
struct ir_raw_event ev = {};
|
||||
u8 buf[128];
|
||||
static const struct rtl28xxu_reg_val_mask refresh_tab[] = {
|
||||
{IR_RX_IF, 0x03, 0xff},
|
||||
@@ -1751,8 +1751,6 @@ static int rtl2832u_rc_query(struct dvb_usb_device *d)
|
||||
}
|
||||
|
||||
/* pass data to Kernel IR decoder */
|
||||
init_ir_raw_event(&ev);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
ev.pulse = buf[i] >> 7;
|
||||
ev.duration = 50800 * (buf[i] & 0x7f);
|
||||
|
Referens i nytt ärende
Block a user