aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/ti-vpe/sc.c
diff options
context:
space:
mode:
authorBehan Webster <behanw@converseincode.com>2014-09-26 21:11:45 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-10-30 08:46:17 -0400
commit61110fbab1f083249ac0ac7090526798d8815210 (patch)
treeb675a9cb672729965f36c7f9d2c2e72f5c0e2321 /drivers/media/platform/ti-vpe/sc.c
parent678fa12fb8e75c6dc1e781a02e3ddbbba7e1a904 (diff)
[media] ti-fpe: LLVMLinux: Remove nested function from ti-vpe
Replace the use of nested functions where a normal function will suffice. Nested functions are not liked by upstream kernel developers in general. Their use breaks the use of clang as a compiler, and doesn't make the code any better. This code now works for both gcc and clang. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Behan Webster <behanw@converseincode.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/ti-vpe/sc.c')
-rw-r--r--drivers/media/platform/ti-vpe/sc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/platform/ti-vpe/sc.c b/drivers/media/platform/ti-vpe/sc.c
index 6314171ffe9b..1088381bd349 100644
--- a/drivers/media/platform/ti-vpe/sc.c
+++ b/drivers/media/platform/ti-vpe/sc.c
@@ -24,12 +24,8 @@ void sc_dump_regs(struct sc_data *sc)
24{ 24{
25 struct device *dev = &sc->pdev->dev; 25 struct device *dev = &sc->pdev->dev;
26 26
27 u32 read_reg(struct sc_data *sc, int offset) 27#define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, \
28 { 28 ioread32(sc->base + CFG_##r))
29 return ioread32(sc->base + offset);
30 }
31
32#define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, read_reg(sc, CFG_##r))
33 29
34 DUMPREG(SC0); 30 DUMPREG(SC0);
35 DUMPREG(SC1); 31 DUMPREG(SC1);