[media] v4l2-mc: fix hardware version for PCI devices
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 19 Feb 2016 14:28:19 +0000 (12:28 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 23 Feb 2016 10:14:50 +0000 (07:14 -0300)
It should be a bitwise or, and not a logical one. Also, add
parenthesis, to make sure it will be applied in the right order.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-mc.c

index a7f41b3235225c9a0a7e031035444275102dd6c9..64eefb9ffb7ed999250157da3a2b3da4940ef23e 100644 (file)
@@ -40,8 +40,8 @@ struct media_device *v4l2_mc_pci_media_device_init(struct pci_dev *pci_dev,
 
        sprintf(mdev->bus_info, "PCI:%s", pci_name(pci_dev));
 
-       mdev->hw_revision = pci_dev->subsystem_vendor << 16
-                           || pci_dev->subsystem_device;
+       mdev->hw_revision = (pci_dev->subsystem_vendor << 16)
+                           | pci_dev->subsystem_device;
 
        mdev->driver_version = LINUX_VERSION_CODE;