diff options
author | Yong Wu <[email protected]> | 2022-02-14 14:08:07 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-02-25 12:16:13 +0100 |
commit | 50a912a8660243b189f57aee9c81b7cd8367e5d2 (patch) | |
tree | 05bce7fa75040b91b8dce10cf5e1b5865af6e940 | |
parent | 11ef5c77abc29d78ccedc26d01deb0bf0b2130f4 (diff) |
drm/sti: Make use of the helper component_compare_of
Use the common compare helper from component.
Cc: Benjamin Gaignard <[email protected]>
Signed-off-by: Yong Wu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/gpu/drm/sti/sti_drv.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index c7efb43b83ee..890c3103f6bd 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -144,11 +144,6 @@ static const struct drm_driver sti_driver = { .minor = DRIVER_MINOR, }; -static int compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int sti_init(struct drm_device *ddev) { struct sti_private *private; @@ -244,7 +239,7 @@ static int sti_platform_probe(struct platform_device *pdev) child_np = of_get_next_available_child(node, NULL); while (child_np) { - drm_of_component_match_add(dev, &match, compare_of, + drm_of_component_match_add(dev, &match, component_compare_of, child_np); child_np = of_get_next_available_child(node, child_np); } |