Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/exynos: rotator: 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>

authored by

Marek Szyprowski and committed by
Inki Dae
f295df17 e1a7b9b4

+3 -8
+3 -8
drivers/gpu/drm/exynos/exynos_drm_rotator.c
··· 15 15 #include <linux/io.h> 16 16 #include <linux/platform_device.h> 17 17 #include <linux/clk.h> 18 + #include <linux/of_device.h> 18 19 #include <linux/pm_runtime.h> 19 20 20 21 #include <drm/drmP.h> ··· 697 696 struct device *dev = &pdev->dev; 698 697 struct rot_context *rot; 699 698 struct exynos_drm_ippdrv *ippdrv; 700 - const struct of_device_id *match; 701 699 int ret; 702 700 703 701 if (!dev->of_node) { ··· 708 708 if (!rot) 709 709 return -ENOMEM; 710 710 711 - match = of_match_node(exynos_rotator_match, dev->of_node); 712 - if (!match) { 713 - dev_err(dev, "failed to match node\n"); 714 - return -ENODEV; 715 - } 716 - rot->limit_tbl = (struct rot_limit_table *)match->data; 717 - 711 + rot->limit_tbl = (struct rot_limit_table *) 712 + of_device_get_match_data(dev); 718 713 rot->regs_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 719 714 rot->regs = devm_ioremap_resource(dev, rot->regs_res); 720 715 if (IS_ERR(rot->regs))