diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-02-06 13:56:16 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-02-06 13:56:16 -0200 |
commit | dc7b5fd0a294c2db79154467e4c635a039849ab3 (patch) | |
tree | 77cf0b107363ea82cd35f2e0503166b18feeb4a0 | |
parent | f7fd21f70b935c84ecc4e250369d381eb187482a (diff) | |
download | mediapointer-dvb-s2-dc7b5fd0a294c2db79154467e4c635a039849ab3.tar.gz mediapointer-dvb-s2-dc7b5fd0a294c2db79154467e4c635a039849ab3.tar.bz2 |
em28xx: Fix endian and returns the correct values
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 72117b5bf..a5d8797e4 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -883,13 +883,13 @@ static int vidioc_g_register(struct file *file, void *priv, reg->val = ret; } else { - u16 val; + u64 val = 0; ret = em28xx_read_reg_req_len(dev, USB_REQ_GET_STATUS, reg->reg, (char *)&val, 2); if (ret < 0) return ret; - reg->val = val; + reg->val = cpu_to_le64((__u64)val); } return 0; @@ -900,9 +900,9 @@ static int vidioc_s_register(struct file *file, void *priv, { struct em28xx_fh *fh = priv; struct em28xx *dev = fh->dev; - u16 buf; + u64 buf; - buf = be16_to_cpu((__u16)reg->val); + buf = le64_to_cpu((__u64)reg->val); return em28xx_write_regs(dev, reg->reg, (char *)&buf, em28xx_reg_len(reg->reg)); |