From: Marek Szyprowski Subject: [PATCH 5/7] drm/exynos: hdmi: use generic of_device_get_match_data helper Date: Fri, 01 Apr 2016 15:17:44 +0200 Message-ID: <1459516666-2004-6-git-send-email-m.szyprowski@samsung.com> References: <1459516666-2004-1-git-send-email-m.szyprowski@samsung.com> Return-path: In-reply-to: <1459516666-2004-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Andrzej Hajda , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz List-Id: dri-devel@lists.freedesktop.org Simplify code by replacing custom code by generic helper. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_hdmi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 06105feb6c87..fb1c0f2850dc 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2015,7 +2015,6 @@ static struct device_node *hdmi_legacy_phy_dt_binding(struct device *dev) static int hdmi_probe(struct platform_device *pdev) { struct device_node *ddc_node, *phy_node; - const struct of_device_id *match; struct device *dev = &pdev->dev; struct hdmi_context *hdata; struct resource *res; @@ -2025,11 +2024,7 @@ static int hdmi_probe(struct platform_device *pdev) if (!hdata) return -ENOMEM; - match = of_match_device(hdmi_match_types, dev); - if (!match) - return -ENODEV; - - hdata->drv_data = match->data; + hdata->drv_data = of_device_get_match_data(dev); platform_set_drvdata(pdev, hdata); -- 1.9.2