]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: fix mask and shift operation on ISPSSPM0
authorColin Ian King <colin.king@canonical.com>
Thu, 16 Jul 2020 14:51:38 +0000 (15:51 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 11:31:53 +0000 (13:31 +0200)
commit8c20f6f32c791295eec930d172f54a561a9f73a5
treedf015d158d29770db21060cbfad13f1f60050be8
parent77a2107b9c2e5d767b165c28ffdca4572265aa8f
media: atomisp: fix mask and shift operation on ISPSSPM0

Currently the check on bits 25:24 on ISPSSPM0 is always 0 because
the mask and shift operations are incorrect. Fix this by shifting
by MRFLD_ISPSSPM0_ISPSSS_OFFSET (24 bits right) and then masking
with RFLD_ISPSSPM0_ISPSSC_MASK (0x03) to get the appropriate 2 bits
to check.

Addresses-Coverity: ("Operands don't affect result")
Fixes: 56f59045a351 ("media: atomisp: simplify the power down/up code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_v4l2.c