43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
From: Sean Young <sean@mess.org>
|
|
Date: Mon, 13 Aug 2012 08:59:47 -0300
|
|
Subject: [09/12] [media] rc: do not wake up rc thread unless there is
|
|
something to do
|
|
|
|
commit b83bfd1b0127b0963fcac39280280e365e7e04d8 upstream.
|
|
|
|
The TechnoTrend USB IR Receiver sends 125 ISO URBs per second, even when
|
|
there is no IR activity. Reduce the number of wake ups from the other
|
|
drivers too.
|
|
|
|
This saves about 0.25ms/s on a 2.4GHz Core 2 according to powertop.
|
|
|
|
Signed-off-by: Sean Young <sean@mess.org>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
[bwh: Restricted to iguanair driver]
|
|
---
|
|
--- a/drivers/media/rc/iguanair.c
|
|
+++ b/drivers/media/rc/iguanair.c
|
|
@@ -134,6 +134,7 @@ static void process_ir_data(struct iguanair *ir, unsigned len)
|
|
} else if (len >= 7) {
|
|
DEFINE_IR_RAW_EVENT(rawir);
|
|
unsigned i;
|
|
+ bool event = false;
|
|
|
|
init_ir_raw_event(&rawir);
|
|
|
|
@@ -147,10 +148,12 @@ static void process_ir_data(struct iguanair *ir, unsigned len)
|
|
RX_RESOLUTION;
|
|
}
|
|
|
|
- ir_raw_event_store_with_filter(ir->rc, &rawir);
|
|
+ if (ir_raw_event_store_with_filter(ir->rc, &rawir))
|
|
+ event = true;
|
|
}
|
|
|
|
- ir_raw_event_handle(ir->rc);
|
|
+ if (event)
|
|
+ ir_raw_event_handle(ir->rc);
|
|
}
|
|
}
|
|
|