gpu: ipu-v3: Remove reg_offset field
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 5 Aug 2014 10:47:38 +0000 (12:47 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 24 Nov 2015 10:30:16 +0000 (11:30 +0100)
This is not used, so remove it.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/ipu-v3/ipu-common.c

index ba47b30d28fad4f3d187393a44a17bd9605f6ad4..97a36e37eded10f1c1c2e0a09f43c8c1c945cb92 100644 (file)
@@ -993,7 +993,6 @@ static void platform_device_unregister_children(struct platform_device *pdev)
 struct ipu_platform_reg {
        struct ipu_client_platformdata pdata;
        const char *name;
-       int reg_offset;
 };
 
 static const struct ipu_platform_reg client_reg[] = {
@@ -1021,7 +1020,6 @@ static const struct ipu_platform_reg client_reg[] = {
                        .dma[0] = IPUV3_CHANNEL_CSI0,
                        .dma[1] = -EINVAL,
                },
-               .reg_offset = IPU_CM_CSI0_REG_OFS,
                .name = "imx-ipuv3-camera",
        }, {
                .pdata = {
@@ -1029,7 +1027,6 @@ static const struct ipu_platform_reg client_reg[] = {
                        .dma[0] = IPUV3_CHANNEL_CSI1,
                        .dma[1] = -EINVAL,
                },
-               .reg_offset = IPU_CM_CSI1_REG_OFS,
                .name = "imx-ipuv3-camera",
        },
 };
@@ -1051,19 +1048,9 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
        for (i = 0; i < ARRAY_SIZE(client_reg); i++) {
                const struct ipu_platform_reg *reg = &client_reg[i];
                struct platform_device *pdev;
-               struct resource res;
-
-               if (reg->reg_offset) {
-                       memset(&res, 0, sizeof(res));
-                       res.flags = IORESOURCE_MEM;
-                       res.start = ipu_base + ipu->devtype->cm_ofs + reg->reg_offset;
-                       res.end = res.start + PAGE_SIZE - 1;
-                       pdev = platform_device_register_resndata(dev, reg->name,
-                               id++, &res, 1, &reg->pdata, sizeof(reg->pdata));
-               } else {
-                       pdev = platform_device_register_data(dev, reg->name,
-                               id++, &reg->pdata, sizeof(reg->pdata));
-               }
+
+               pdev = platform_device_register_data(dev, reg->name,
+                       id++, &reg->pdata, sizeof(reg->pdata));
 
                if (IS_ERR(pdev)) {
                        ret = PTR_ERR(pdev);