diff options
Diffstat (limited to 'drivers/gpu/drm/tinydrm/mi0283qt.c')
-rw-r--r-- | drivers/gpu/drm/tinydrm/mi0283qt.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c index adc8c4872d3f..9d284fb24c36 100644 --- a/drivers/gpu/drm/tinydrm/mi0283qt.c +++ b/drivers/gpu/drm/tinydrm/mi0283qt.c @@ -51,8 +51,8 @@ static void mi0283qt_enable(struct drm_simple_display_pipe *pipe, struct drm_crtc_state *crtc_state, struct drm_plane_state *plane_state) { - struct mipi_dbi *mipi = drm_to_mipi_dbi(pipe->crtc.dev); - struct mipi_dbi *dbi = mipi; + struct mipi_dbi *dbidev = drm_to_mipi_dbi(pipe->crtc.dev); + struct mipi_dbi *dbi = dbidev; u8 addr_mode; int ret, idx; @@ -61,7 +61,7 @@ static void mi0283qt_enable(struct drm_simple_display_pipe *pipe, DRM_DEBUG_KMS("\n"); - ret = mipi_dbi_poweron_conditional_reset(mipi); + ret = mipi_dbi_poweron_conditional_reset(dbidev); if (ret < 0) goto out_exit; if (ret == 1) @@ -117,7 +117,7 @@ out_enable: * As a result, we need to always apply the rotation value * regardless of the display "on/off" state. */ - switch (mipi->rotation) { + switch (dbidev->rotation) { default: addr_mode = ILI9341_MADCTL_MV | ILI9341_MADCTL_MY | ILI9341_MADCTL_MX; @@ -134,7 +134,7 @@ out_enable: } addr_mode |= ILI9341_MADCTL_BGR; mipi_dbi_command(dbi, MIPI_DCS_SET_ADDRESS_MODE, addr_mode); - mipi_dbi_enable_flush(mipi, crtc_state, plane_state); + mipi_dbi_enable_flush(dbidev, crtc_state, plane_state); out_exit: drm_dev_exit(idx); } @@ -180,22 +180,22 @@ MODULE_DEVICE_TABLE(spi, mi0283qt_id); static int mi0283qt_probe(struct spi_device *spi) { struct device *dev = &spi->dev; + struct mipi_dbi *dbidev; struct drm_device *drm; - struct mipi_dbi *mipi; struct mipi_dbi *dbi; struct gpio_desc *dc; u32 rotation = 0; int ret; - mipi = kzalloc(sizeof(*mipi), GFP_KERNEL); - if (!mipi) + dbidev = kzalloc(sizeof(*dbidev), GFP_KERNEL); + if (!dbidev) return -ENOMEM; - dbi = mipi; - drm = &mipi->drm; + dbi = dbidev; + drm = &dbidev->drm; ret = devm_drm_dev_init(dev, drm, &mi0283qt_driver); if (ret) { - kfree(mipi); + kfree(dbidev); return ret; } @@ -213,13 +213,13 @@ static int mi0283qt_probe(struct spi_device *spi) return PTR_ERR(dc); } - mipi->regulator = devm_regulator_get(dev, "power"); - if (IS_ERR(mipi->regulator)) - return PTR_ERR(mipi->regulator); + dbidev->regulator = devm_regulator_get(dev, "power"); + if (IS_ERR(dbidev->regulator)) + return PTR_ERR(dbidev->regulator); - mipi->backlight = devm_of_find_backlight(dev); - if (IS_ERR(mipi->backlight)) - return PTR_ERR(mipi->backlight); + dbidev->backlight = devm_of_find_backlight(dev); + if (IS_ERR(dbidev->backlight)) + return PTR_ERR(dbidev->backlight); device_property_read_u32(dev, "rotation", &rotation); @@ -227,7 +227,7 @@ static int mi0283qt_probe(struct spi_device *spi) if (ret) return ret; - ret = mipi_dbi_init(mipi, &mi0283qt_pipe_funcs, &mi0283qt_mode, rotation); + ret = mipi_dbi_init(dbidev, &mi0283qt_pipe_funcs, &mi0283qt_mode, rotation); if (ret) return ret; |