Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d873ab99 authored by Seung-Woo Kim's avatar Seung-Woo Kim Committed by Inki Dae
Browse files

drm/exynos: cleanup device pointer usages



Struct device pointer got from platform device pointer is already
alsigned as variable, but some functions do not use device pointer.
So this patch replaces thoes usages.

Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 20cd2640
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1884,7 +1884,7 @@ static int fimc_probe(struct platform_device *pdev)
		goto err_pm_dis;
	}

	dev_info(&pdev->dev, "drm fimc registered successfully.\n");
	dev_info(dev, "drm fimc registered successfully.\n");

	return 0;

+5 −5
Original line number Diff line number Diff line
@@ -885,7 +885,7 @@ static int fimd_probe(struct platform_device *pdev)

	DRM_DEBUG_KMS("%s\n", __FILE__);

	if (pdev->dev.of_node) {
	if (dev->of_node) {
		pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
		if (!pdata) {
			DRM_ERROR("memory allocation for pdata failed\n");
@@ -899,7 +899,7 @@ static int fimd_probe(struct platform_device *pdev)
			return ret;
		}
	} else {
		pdata = pdev->dev.platform_data;
		pdata = dev->platform_data;
		if (!pdata) {
			DRM_ERROR("no platform data specified\n");
			return -EINVAL;
@@ -912,7 +912,7 @@ static int fimd_probe(struct platform_device *pdev)
		return -EINVAL;
	}

	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
	ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
	if (!ctx)
		return -ENOMEM;

@@ -930,7 +930,7 @@ static int fimd_probe(struct platform_device *pdev)

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

	ctx->regs = devm_ioremap_resource(&pdev->dev, res);
	ctx->regs = devm_ioremap_resource(dev, res);
	if (IS_ERR(ctx->regs))
		return PTR_ERR(ctx->regs);

@@ -942,7 +942,7 @@ static int fimd_probe(struct platform_device *pdev)

	ctx->irq = res->start;

	ret = devm_request_irq(&pdev->dev, ctx->irq, fimd_irq_handler,
	ret = devm_request_irq(dev, ctx->irq, fimd_irq_handler,
							0, "drm_fimd", ctx);
	if (ret) {
		dev_err(dev, "irq request failed.\n");
+3 −3
Original line number Diff line number Diff line
@@ -1379,7 +1379,7 @@ static int g2d_probe(struct platform_device *pdev)
	struct exynos_drm_subdrv *subdrv;
	int ret;

	g2d = devm_kzalloc(&pdev->dev, sizeof(*g2d), GFP_KERNEL);
	g2d = devm_kzalloc(dev, sizeof(*g2d), GFP_KERNEL);
	if (!g2d) {
		dev_err(dev, "failed to allocate driver data\n");
		return -ENOMEM;
@@ -1417,7 +1417,7 @@ static int g2d_probe(struct platform_device *pdev)

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

	g2d->regs = devm_ioremap_resource(&pdev->dev, res);
	g2d->regs = devm_ioremap_resource(dev, res);
	if (IS_ERR(g2d->regs)) {
		ret = PTR_ERR(g2d->regs);
		goto err_put_clk;
@@ -1430,7 +1430,7 @@ static int g2d_probe(struct platform_device *pdev)
		goto err_put_clk;
	}

	ret = devm_request_irq(&pdev->dev, g2d->irq, g2d_irq_handler, 0,
	ret = devm_request_irq(dev, g2d->irq, g2d_irq_handler, 0,
								"drm_g2d", g2d);
	if (ret < 0) {
		dev_err(dev, "irq request failed\n");
+1 −1
Original line number Diff line number Diff line
@@ -1743,7 +1743,7 @@ static int gsc_probe(struct platform_device *pdev)
		goto err_ippdrv_register;
	}

	dev_info(&pdev->dev, "drm gsc registered successfully.\n");
	dev_info(dev, "drm gsc registered successfully.\n");

	return 0;

+1 −1
Original line number Diff line number Diff line
@@ -442,7 +442,7 @@ static int exynos_drm_hdmi_probe(struct platform_device *pdev)

	DRM_DEBUG_KMS("%s\n", __FILE__);

	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
	ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
	if (!ctx) {
		DRM_LOG_KMS("failed to alloc common hdmi context.\n");
		return -ENOMEM;
Loading