aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/ti-vpe/csc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/ti-vpe/csc.c')
-rw-r--r--drivers/media/platform/ti-vpe/csc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/platform/ti-vpe/csc.c b/drivers/media/platform/ti-vpe/csc.c
index 940df4000c42..bec674994752 100644
--- a/drivers/media/platform/ti-vpe/csc.c
+++ b/drivers/media/platform/ti-vpe/csc.c
@@ -93,12 +93,8 @@ void csc_dump_regs(struct csc_data *csc)
93{ 93{
94 struct device *dev = &csc->pdev->dev; 94 struct device *dev = &csc->pdev->dev;
95 95
96 u32 read_reg(struct csc_data *csc, int offset) 96#define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, \
97 { 97 ioread32(csc->base + CSC_##r))
98 return ioread32(csc->base + offset);
99 }
100
101#define DUMPREG(r) dev_dbg(dev, "%-35s %08x\n", #r, read_reg(csc, CSC_##r))
102 98
103 DUMPREG(CSC00); 99 DUMPREG(CSC00);
104 DUMPREG(CSC01); 100 DUMPREG(CSC01);
@@ -189,7 +185,7 @@ struct csc_data *csc_create(struct platform_device *pdev)
189 csc->base = devm_ioremap_resource(&pdev->dev, csc->res); 185 csc->base = devm_ioremap_resource(&pdev->dev, csc->res);
190 if (IS_ERR(csc->base)) { 186 if (IS_ERR(csc->base)) {
191 dev_err(&pdev->dev, "failed to ioremap\n"); 187 dev_err(&pdev->dev, "failed to ioremap\n");
192 return csc->base; 188 return ERR_CAST(csc->base);
193 } 189 }
194 190
195 return csc; 191 return csc;