aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/mceusb.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2011-01-18 15:31:24 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-31 09:20:11 -0500
commitb4608faee04047ecb15d2acf276d12e21b170b0d (patch)
tree92e6fae36276225ad9fb859c39a8639cf4e5344a /drivers/media/rc/mceusb.c
parent457e2ffcef340f0fa5c1a8edb57e8c42279c7edf (diff)
[media] rc: use time unit conversion macros correctly
Due to my own stupidity, some of the wrong time unit conversion macros were being used inside some of the IR drivers I've been working on. Fix that, and convert over some additional places to also use the macros. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/mceusb.c')
-rw-r--r--drivers/media/rc/mceusb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 079353e5d558..6012fb2d722d 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -816,7 +816,7 @@ static void mceusb_handle_command(struct mceusb_dev *ir, int index)
816 switch (ir->buf_in[index]) { 816 switch (ir->buf_in[index]) {
817 /* 2-byte return value commands */ 817 /* 2-byte return value commands */
818 case MCE_CMD_S_TIMEOUT: 818 case MCE_CMD_S_TIMEOUT:
819 ir->rc->timeout = MS_TO_NS((hi << 8 | lo) / 2); 819 ir->rc->timeout = US_TO_NS((hi << 8 | lo) / 2);
820 break; 820 break;
821 821
822 /* 1-byte return value commands */ 822 /* 1-byte return value commands */
@@ -857,7 +857,7 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
857 ir->rem--; 857 ir->rem--;
858 rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0); 858 rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0);
859 rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK) 859 rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK)
860 * MS_TO_US(MCE_TIME_UNIT); 860 * US_TO_NS(MCE_TIME_UNIT);
861 861
862 dev_dbg(ir->dev, "Storing %s with duration %d\n", 862 dev_dbg(ir->dev, "Storing %s with duration %d\n",
863 rawir.pulse ? "pulse" : "space", 863 rawir.pulse ? "pulse" : "space",
@@ -1060,7 +1060,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir)
1060 rc->priv = ir; 1060 rc->priv = ir;
1061 rc->driver_type = RC_DRIVER_IR_RAW; 1061 rc->driver_type = RC_DRIVER_IR_RAW;
1062 rc->allowed_protos = RC_TYPE_ALL; 1062 rc->allowed_protos = RC_TYPE_ALL;
1063 rc->timeout = MS_TO_NS(1000); 1063 rc->timeout = US_TO_NS(1000);
1064 if (!ir->flags.no_tx) { 1064 if (!ir->flags.no_tx) {
1065 rc->s_tx_mask = mceusb_set_tx_mask; 1065 rc->s_tx_mask = mceusb_set_tx_mask;
1066 rc->s_tx_carrier = mceusb_set_tx_carrier; 1066 rc->s_tx_carrier = mceusb_set_tx_carrier;