aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2020-09-25 20:30:16 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-10-01 09:33:36 +0200
commitc638913669bbcd18282ac848b2fd2664eed62e6e (patch)
treeffe756157b57e973ff53d96425a78154b7a6c814
parentmedia: zoran: fix checkpatch issue (diff)
downloadlinux-dev-c638913669bbcd18282ac848b2fd2664eed62e6e.tar.xz
linux-dev-c638913669bbcd18282ac848b2fd2664eed62e6e.zip
media: zoran: do not forward declare zr36057_init_vfe
move function for avoiding forward declaration Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/zoran/zoran_device.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/drivers/staging/media/zoran/zoran_device.c b/drivers/staging/media/zoran/zoran_device.c
index cbacfa4ea2d0..cf3e2b5e4b4e 100644
--- a/drivers/staging/media/zoran/zoran_device.c
+++ b/drivers/staging/media/zoran/zoran_device.c
@@ -55,7 +55,27 @@ static bool lml33dpath; /* default = 0
module_param(lml33dpath, bool, 0644);
MODULE_PARM_DESC(lml33dpath, "Use digital path capture mode (on LML33 cards)");
-static void zr36057_init_vfe(struct zoran *zr);
+/*
+ * initialize video front end
+ */
+static void zr36057_init_vfe(struct zoran *zr)
+{
+ u32 reg;
+
+ reg = btread(ZR36057_VFESPFR);
+ reg |= ZR36057_VFESPFR_LittleEndian;
+ reg &= ~ZR36057_VFESPFR_VCLKPol;
+ reg |= ZR36057_VFESPFR_ExtFl;
+ reg |= ZR36057_VFESPFR_TopField;
+ btwrite(reg, ZR36057_VFESPFR);
+ reg = btread(ZR36057_VDCR);
+ if (pci_pci_problems & PCIPCI_TRITON)
+ // || zr->revision < 1) // Revision 1 has also Triton support
+ reg &= ~ZR36057_VDCR_Triton;
+ else
+ reg |= ZR36057_VDCR_Triton;
+ btwrite(reg, ZR36057_VDCR);
+}
/*
* General Purpose I/O and Guest bus access
@@ -1491,25 +1511,3 @@ void zr36057_restart(struct zoran *zr)
btwrite((0x81 << 24) | 0x8888, ZR36057_GPPGCR1);
}
-/*
- * initialize video front end
- */
-
-static void zr36057_init_vfe(struct zoran *zr)
-{
- u32 reg;
-
- reg = btread(ZR36057_VFESPFR);
- reg |= ZR36057_VFESPFR_LittleEndian;
- reg &= ~ZR36057_VFESPFR_VCLKPol;
- reg |= ZR36057_VFESPFR_ExtFl;
- reg |= ZR36057_VFESPFR_TopField;
- btwrite(reg, ZR36057_VFESPFR);
- reg = btread(ZR36057_VDCR);
- if (pci_pci_problems & PCIPCI_TRITON)
- // || zr->revision < 1) // Revision 1 has also Triton support
- reg &= ~ZR36057_VDCR_Triton;
- else
- reg |= ZR36057_VDCR_Triton;
- btwrite(reg, ZR36057_VDCR);
-}