On Sunday 16 March 2014 10:39:39 Antti Seppälä wrote: > > +static int nvt_write_wakeup_codes(struct rc_dev *dev, > > + const u8 *wakeup_sample_buf, int count) > > +{ > > + int i = 0; > > + u8 reg, reg_learn_mode; > > + unsigned long flags; > > + struct nvt_dev *nvt = dev->priv; > > + > > + nvt_dbg_wake("writing wakeup samples"); > > + > > + reg = nvt_cir_wake_reg_read(nvt, CIR_WAKE_IRCON); > > + reg_learn_mode = reg & ~CIR_WAKE_IRCON_MODE0; > > + reg_learn_mode |= CIR_WAKE_IRCON_MODE1; > > + > > + /* Lock the learn area to prevent racing with wake-isr */ > > + spin_lock_irqsave(&nvt->nvt_lock, flags); > > + > > + /* Enable fifo writes */ > > + nvt_cir_wake_reg_write(nvt, reg_learn_mode, CIR_WAKE_IRCON); > > + > > + /* Clear cir wake rx fifo */ > > + nvt_clear_cir_wake_fifo(nvt); > > + > > + if (count > WAKE_FIFO_LEN) { > > + nvt_dbg_wake("HW FIFO too small for all wake samples"); > > + count = WAKE_FIFO_LEN; > > + } > > Now that the encoders support partial encoding the above check against > WAKE_FIFO_LEN never triggers and can be removed. Yep, good point Thanks James
Attachment:
signature.asc
Description: This is a digitally signed message part.