drm/exynos: exynos5433_decon: 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
196e059a8a
commit
217afc1ee4
|
@ -631,7 +631,6 @@ MODULE_DEVICE_TABLE(of, exynos5433_decon_driver_dt_match);
|
||||||
|
|
||||||
static int exynos5433_decon_probe(struct platform_device *pdev)
|
static int exynos5433_decon_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
const struct of_device_id *of_id;
|
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct decon_context *ctx;
|
struct decon_context *ctx;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
@ -644,9 +643,7 @@ static int exynos5433_decon_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
__set_bit(BIT_SUSPENDED, &ctx->flags);
|
__set_bit(BIT_SUSPENDED, &ctx->flags);
|
||||||
ctx->dev = dev;
|
ctx->dev = dev;
|
||||||
|
ctx->out_type = (enum decon_iftype)of_device_get_match_data(dev);
|
||||||
of_id = of_match_device(exynos5433_decon_driver_dt_match, &pdev->dev);
|
|
||||||
ctx->out_type = (enum decon_iftype)of_id->data;
|
|
||||||
|
|
||||||
if (ctx->out_type == IFTYPE_HDMI)
|
if (ctx->out_type == IFTYPE_HDMI)
|
||||||
ctx->first_win = 1;
|
ctx->first_win = 1;
|
||||||
|
|
Loading…
Reference in New Issue