[media] msi3101: fix overflow in freq setting
authorAntti Palosaari <crope@iki.fi>
Wed, 7 Aug 2013 03:02:40 +0000 (00:02 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 20 Aug 2013 19:07:07 +0000 (16:07 -0300)
Higher frequencies were not possible to set correctly as that value
overflows.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/msi3101/sdr-msi3101.c

index 93168dbd183e15ff080691de0d09717ec607fd82..56f97577a760ed8d4c18ff9e32c9a3a63eeabe0d 100644 (file)
@@ -1507,11 +1507,11 @@ static int vidioc_s_frequency(struct file *file, void *priv,
                const struct v4l2_frequency *f)
 {
        struct msi3101_state *s = video_drvdata(file);
-       dev_dbg(&s->udev->dev, "%s: frequency=%u Hz (%d)\n",
-                       __func__, f->frequency * 625U / 10U, f->frequency);
+       dev_dbg(&s->udev->dev, "%s: frequency=%lu Hz (%u)\n",
+                       __func__, f->frequency * 625UL / 10UL, f->frequency);
 
        return v4l2_ctrl_s_ctrl_int64(s->ctrl_tuner_rf,
-                       f->frequency * 625U / 10U);
+                       f->frequency * 625UL / 10UL);
 }
 
 const struct v4l2_ioctl_ops msi3101_ioctl_ops = {