diff options
Diffstat (limited to 'drivers/gpu/drm/sprd/sprd_dsi.c')
| -rw-r--r-- | drivers/gpu/drm/sprd/sprd_dsi.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/gpu/drm/sprd/sprd_dsi.c b/drivers/gpu/drm/sprd/sprd_dsi.c index 911b3cddc264..23b0e1dc547a 100644 --- a/drivers/gpu/drm/sprd/sprd_dsi.c +++ b/drivers/gpu/drm/sprd/sprd_dsi.c @@ -5,15 +5,12 @@ #include <linux/component.h> #include <linux/module.h> -#include <linux/of_address.h> -#include <linux/of_device.h> -#include <linux/of_irq.h> -#include <linux/of_graph.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <video/mipi_display.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/drm_crtc_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h> @@ -212,7 +209,7 @@ static int regmap_tst_io_read(void *context, u32 reg, u32 *val) return 0; } -static struct regmap_bus regmap_tst_io = { +static const struct regmap_bus regmap_tst_io = { .reg_write = regmap_tst_io_write, .reg_read = regmap_tst_io_read, }; @@ -904,13 +901,11 @@ static int sprd_dsi_context_init(struct sprd_dsi *dsi, { struct platform_device *pdev = to_platform_device(dev); struct dsi_context *ctx = &dsi->ctx; - struct resource *res; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap(dev, res->start, resource_size(res)); - if (!ctx->base) { + ctx->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(ctx->base)) { drm_err(dsi->drm, "failed to map dsi host registers\n"); - return -ENXIO; + return PTR_ERR(ctx->base); } ctx->regmap = devm_regmap_init(dev, ®map_tst_io, dsi, &byte_config); @@ -1049,13 +1044,11 @@ static int sprd_dsi_probe(struct platform_device *pdev) return mipi_dsi_host_register(&dsi->host); } -static int sprd_dsi_remove(struct platform_device *pdev) +static void sprd_dsi_remove(struct platform_device *pdev) { struct sprd_dsi *dsi = dev_get_drvdata(&pdev->dev); mipi_dsi_host_unregister(&dsi->host); - - return 0; } struct platform_driver sprd_dsi_driver = { |
