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

Commit 48f6155a authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Inki Dae
Browse files

drm/exynos: mixer: use generic of_device_get_match_data helper



Simplify code by replacing custom code by generic helper.

Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 8dfae156
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/consumer.h>
#include <linux/of.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/component.h>
#include <linux/component.h>


#include <drm/exynos_drm.h>
#include <drm/exynos_drm.h>
@@ -1235,7 +1236,7 @@ static const struct component_ops mixer_component_ops = {
static int mixer_probe(struct platform_device *pdev)
static int mixer_probe(struct platform_device *pdev)
{
{
	struct device *dev = &pdev->dev;
	struct device *dev = &pdev->dev;
	struct mixer_drv_data *drv;
	const struct mixer_drv_data *drv;
	struct mixer_context *ctx;
	struct mixer_context *ctx;
	int ret;
	int ret;


@@ -1245,12 +1246,7 @@ static int mixer_probe(struct platform_device *pdev)
		return -ENOMEM;
		return -ENOMEM;
	}
	}


	if (dev->of_node) {
	drv = of_device_get_match_data(dev);
		const struct of_device_id *match;

		match = of_match_node(mixer_match_types, dev->of_node);
		drv = (struct mixer_drv_data *)match->data;
	}


	ctx->pdev = pdev;
	ctx->pdev = pdev;
	ctx->dev = dev;
	ctx->dev = dev;