Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0df8130fe80ebde052516c1d729aa5d1c69ebc5c Commit: 0df8130fe80ebde052516c1d729aa5d1c69ebc5c Parent: 0da5176f4e0d5aea3e33a11a17c1847939df4dcc Author: Mauro Carvalho Chehab <[EMAIL PROTECTED]> AuthorDate: Wed Feb 6 15:56:16 2008 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Mon Feb 18 11:15:15 2008 -0300
V4L/DVB (7162): em28xx: Fix endian and returns the correct values Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/em28xx/em28xx-video.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 4c836ad..f69f591 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -861,13 +861,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; @@ -878,9 +878,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)); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html