From: Marek Szyprowski Date: Fri, 1 Apr 2016 13:17:46 +0000 (+0200) Subject: drm/exynos: mixer: use generic of_device_get_match_data helper X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=48f6155a137828ab4d570650c5aaa0a897f825be;p=openwrt%2Fstaging%2Fblogic.git drm/exynos: mixer: use generic of_device_get_match_data helper Simplify code by replacing custom code by generic helper. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index d131a5a27a07..d1a9944a1759 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -1235,7 +1236,7 @@ static const struct component_ops mixer_component_ops = { static int mixer_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct mixer_drv_data *drv; + const struct mixer_drv_data *drv; struct mixer_context *ctx; int ret; @@ -1245,12 +1246,7 @@ static int mixer_probe(struct platform_device *pdev) return -ENOMEM; } - if (dev->of_node) { - const struct of_device_id *match; - - match = of_match_node(mixer_match_types, dev->of_node); - drv = (struct mixer_drv_data *)match->data; - } + drv = of_device_get_match_data(dev); ctx->pdev = pdev; ctx->dev = dev;