drm/exynos: hdmi: use generic of_device_get_match_data helper
Simplify code by replacing custom code by generic helper. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
f295df175a
commit
57a64122b6
|
@ -1760,7 +1760,6 @@ static struct device_node *hdmi_legacy_phy_dt_binding(struct device *dev)
|
||||||
static int hdmi_probe(struct platform_device *pdev)
|
static int hdmi_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *ddc_node, *phy_node;
|
struct device_node *ddc_node, *phy_node;
|
||||||
const struct of_device_id *match;
|
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct hdmi_context *hdata;
|
struct hdmi_context *hdata;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
@ -1770,11 +1769,7 @@ static int hdmi_probe(struct platform_device *pdev)
|
||||||
if (!hdata)
|
if (!hdata)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
match = of_match_device(hdmi_match_types, dev);
|
hdata->drv_data = of_device_get_match_data(dev);
|
||||||
if (!match)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
hdata->drv_data = match->data;
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, hdata);
|
platform_set_drvdata(pdev, hdata);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue