From: Rob Herring Date: Mon, 9 Oct 2023 21:13:43 +0000 (-0500) Subject: soc: ti: knav_qmss_queue: Use device_get_match_data() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=50c01a942b287451ed7bec290ac09e07b91c6253;p=linux.git soc: ti: knav_qmss_queue: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231009211356.3242037-13-robh@kernel.org Signed-off-by: Nishanth Menon --- diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index cea7917179576..06fb5505c22c7 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -14,10 +14,12 @@ #include #include #include +#include #include -#include #include +#include #include +#include #include #include @@ -1754,7 +1756,6 @@ static int knav_queue_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; struct device_node *qmgrs, *queue_pools, *regions, *pdsps; - const struct of_device_id *match; struct device *dev = &pdev->dev; u32 temp[2]; int ret; @@ -1770,8 +1771,7 @@ static int knav_queue_probe(struct platform_device *pdev) return -ENOMEM; } - match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev); - if (match && match->data) + if (device_get_match_data(dev)) kdev->version = QMSS_66AK2G; platform_set_drvdata(pdev, kdev);