Skip to content

Commit

Permalink
drm/exynos: mixer: use generic of_device_get_match_data helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Szyprowski authored and Inki Dae committed Apr 30, 2016
1 parent 8dfae15 commit 48f6155
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/gpu/drm/exynos/exynos_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/component.h>

#include <drm/exynos_drm.h>
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 48f6155

Please sign in to comment.