Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[pandora-kernel.git] / drivers / media / rc / mceusb.c
index ec972dc..85ff9a1 100644 (file)
@@ -692,20 +692,18 @@ static void mce_flush_rx_buffer(struct mceusb_dev *ir, int size)
 }
 
 /* Send data out the IR blaster port(s) */
-static int mceusb_tx_ir(struct rc_dev *dev, int *txbuf, u32 n)
+static int mceusb_tx_ir(struct rc_dev *dev, unsigned *txbuf, unsigned count)
 {
        struct mceusb_dev *ir = dev->priv;
        int i, ret = 0;
-       int count, cmdcount = 0;
+       int cmdcount = 0;
        unsigned char *cmdbuf; /* MCE command buffer */
        long signal_duration = 0; /* Singnal length in us */
        struct timeval start_time, end_time;
 
        do_gettimeofday(&start_time);
 
-       count = n / sizeof(int);
-
-       cmdbuf = kzalloc(sizeof(int) * MCE_CMDBUF_SIZE, GFP_KERNEL);
+       cmdbuf = kzalloc(sizeof(unsigned) * MCE_CMDBUF_SIZE, GFP_KERNEL);
        if (!cmdbuf)
                return -ENOMEM;
 
@@ -774,7 +772,7 @@ static int mceusb_tx_ir(struct rc_dev *dev, int *txbuf, u32 n)
 
 out:
        kfree(cmdbuf);
-       return ret ? ret : n;
+       return ret ? ret : count;
 }
 
 /* Sets active IR outputs -- mce devices typically have two */