Skip to content

Commit

Permalink
soc: ti: knav_qmss_queue: Use device_get_match_data()
Browse files Browse the repository at this point in the history
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 <robh@kernel.org>
Link: https://lore.kernel.org/r/20231009211356.3242037-13-robh@kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>
  • Loading branch information
Rob Herring authored and Nishanth Menon committed Oct 16, 2023
1 parent 05e5f73 commit 50c01a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/soc/ti/knav_qmss_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/soc/ti/knav_qmss.h>

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

0 comments on commit 50c01a9

Please sign in to comment.