Commit 61110fba authored by Behan Webster's avatar Behan Webster Committed by Mauro Carvalho Chehab

[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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 678fa12f
...@@ -93,12 +93,8 @@ void csc_dump_regs(struct csc_data *csc) ...@@ -93,12 +93,8 @@ void csc_dump_regs(struct csc_data *csc)
{ {
struct device *dev = &csc->pdev->dev; struct device *dev = &csc->pdev->dev;
u32 read_reg(struct csc_data *csc, int offset) #define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, \
{ ioread32(csc->base + CSC_##r))
return ioread32(csc->base + offset);
}
#define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, read_reg(csc, CSC_##r))
DUMPREG(CSC00); DUMPREG(CSC00);
DUMPREG(CSC01); DUMPREG(CSC01);
......
...@@ -24,12 +24,8 @@ void sc_dump_regs(struct sc_data *sc) ...@@ -24,12 +24,8 @@ void sc_dump_regs(struct sc_data *sc)
{ {
struct device *dev = &sc->pdev->dev; struct device *dev = &sc->pdev->dev;
u32 read_reg(struct sc_data *sc, int offset) #define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, \
{ ioread32(sc->base + CFG_##r))
return ioread32(sc->base + offset);
}
#define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, read_reg(sc, CFG_##r))
DUMPREG(SC0); DUMPREG(SC0);
DUMPREG(SC1); DUMPREG(SC1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment