media: don't do a 31 bit shift on a signed int
[sfrench/cifs-2.6.git] / drivers / media / platform / fsl-viu.c
index 691be788e38b36574e5af88a71a711d6f53b092a..81a8faedbba6cba3e3bd353ac4e97648d695ea06 100644 (file)
@@ -32,7 +32,7 @@
 #define VIU_VERSION            "0.5.1"
 
 /* Allow building this driver with COMPILE_TEST */
-#ifndef CONFIG_PPC
+#if !defined(CONFIG_PPC) && !defined(CONFIG_MICROBLAZE)
 #define out_be32(v, a) iowrite32be(a, (void __iomem *)v)
 #define in_be32(a)     ioread32be((void __iomem *)a)
 #endif
@@ -214,7 +214,7 @@ enum status_config {
        FIELD_NO                = 0x01 << 28,   /* Field number */
        DITHER_ON               = 0x01 << 29,   /* Dithering is on */
        ROUND_ON                = 0x01 << 30,   /* Round is on */
-       MODE_32BIT              = 0x01 << 31,   /* Data in RGBa888,
+       MODE_32BIT              = 1UL << 31,    /* Data in RGBa888,
                                                 * 0 in RGB565
                                                 */
 };
@@ -563,11 +563,6 @@ static int vidioc_querycap(struct file *file, void *priv,
        strscpy(cap->driver, "viu", sizeof(cap->driver));
        strscpy(cap->card, "viu", sizeof(cap->card));
        strscpy(cap->bus_info, "platform:viu", sizeof(cap->bus_info));
-       cap->device_caps =      V4L2_CAP_VIDEO_CAPTURE |
-                               V4L2_CAP_STREAMING     |
-                               V4L2_CAP_VIDEO_OVERLAY |
-                               V4L2_CAP_READWRITE;
-       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
 }
 
@@ -1380,6 +1375,8 @@ static const struct video_device viu_template = {
        .release        = video_device_release,
 
        .tvnorms        = V4L2_STD_NTSC_M | V4L2_STD_PAL,
+       .device_caps    = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
+                         V4L2_CAP_VIDEO_OVERLAY | V4L2_CAP_READWRITE,
 };
 
 static int viu_of_probe(struct platform_device *op)