Skip to content

Commit 50c01a9

Browse files
robherringnmenon
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nishanth Menon <[email protected]>
1 parent 05e5f73 commit 50c01a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/soc/ti/knav_qmss_queue.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
#include <linux/interrupt.h>
1515
#include <linux/io.h>
1616
#include <linux/module.h>
17+
#include <linux/of.h>
1718
#include <linux/of_address.h>
18-
#include <linux/of_device.h>
1919
#include <linux/of_irq.h>
20+
#include <linux/platform_device.h>
2021
#include <linux/pm_runtime.h>
22+
#include <linux/property.h>
2123
#include <linux/slab.h>
2224
#include <linux/soc/ti/knav_qmss.h>
2325

@@ -1754,7 +1756,6 @@ static int knav_queue_probe(struct platform_device *pdev)
17541756
{
17551757
struct device_node *node = pdev->dev.of_node;
17561758
struct device_node *qmgrs, *queue_pools, *regions, *pdsps;
1757-
const struct of_device_id *match;
17581759
struct device *dev = &pdev->dev;
17591760
u32 temp[2];
17601761
int ret;
@@ -1770,8 +1771,7 @@ static int knav_queue_probe(struct platform_device *pdev)
17701771
return -ENOMEM;
17711772
}
17721773

1773-
match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev);
1774-
if (match && match->data)
1774+
if (device_get_match_data(dev))
17751775
kdev->version = QMSS_66AK2G;
17761776

17771777
platform_set_drvdata(pdev, kdev);

0 commit comments

Comments
 (0)