diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-21 12:09:22 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-21 12:09:22 +0300 |
commit | 7cce2f4cb7f5f641f78c8e3eea4e7b1b96cb71c0 (patch) | |
tree | b064d077928cf224660ab1e1841cdab2c9fd8b08 /drivers/media/video/v4l1-compat.c | |
parent | e055f7e873d900925c222cf2d1ec955af4a9ca90 (diff) | |
parent | ebc79c4f8da0f92efa968e0328f32334a2ce80cf (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into linux-next
Conflicts:
fs/ubifs/super.c
Merge the upstream tree in order to resolve a conflict with the
per-bdi writeback changes from the linux-2.6-block tree.
Diffstat (limited to 'drivers/media/video/v4l1-compat.c')
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index 02f2a6d18b4..761fbd64db5 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c @@ -76,9 +76,8 @@ get_v4l_control(struct file *file, dprintk("VIDIOC_G_CTRL: %d\n", err); return 0; } - return ((ctrl2.value - qctrl2.minimum) * 65535 - + (qctrl2.maximum - qctrl2.minimum) / 2) - / (qctrl2.maximum - qctrl2.minimum); + return DIV_ROUND_CLOSEST((ctrl2.value-qctrl2.minimum) * 65535, + qctrl2.maximum - qctrl2.minimum); } return 0; } |