/* zhenhua_interrupt() is called by the low level driver when characters are ready for us. We then buffer them for further processing, or call the packet processing routine.  */
static irqreturn_t zhenhua_interrupt(struct serio *serio, unsigned char data, unsigned int flags)
/* zhenhua_interrupt() is called by the low level driver when characters are ready for us. We then buffer them for further processing, or call the packet processing routine.  */
static irqreturn_t zhenhua_interrupt(struct serio *serio, unsigned char data, unsigned int flags)
{
	struct zhenhua *zhenhua = serio_get_drvdata(serio);
	if (data == 0xef)
		zhenhua->idx = 0;
	else if (zhenhua->idx == 0)
		return IRQ_HANDLED;
	if (zhenhua->idx < ZHENHUA_MAX_LENGTH)
		zhenhua->data[zhenhua->idx++] = zhenhua_bitreverse(data);
	if (zhenhua->idx == ZHENHUA_MAX_LENGTH) {
		zhenhua_process_packet(zhenhua);
		zhenhua->idx = 0;
	}
	return IRQ_HANDLED;
}