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

soc: ti: k3-ringacc: Use of_device_get_match_data()

Simplify the retrieval of getting the match data in the probe
function by directly using of_device_get_match_data() instead
of using of_match_node() and getting data.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

authored by

Suman Anna and committed by
Santosh Shilimkar
a8fc8e5b ea797f69

+3 -4
+3 -4
drivers/soc/ti/k3-ringacc.c
··· 9 9 #include <linux/io.h> 10 10 #include <linux/init.h> 11 11 #include <linux/of.h> 12 + #include <linux/of_device.h> 12 13 #include <linux/platform_device.h> 13 14 #include <linux/sys_soc.h> 14 15 #include <linux/dma/ti-cppi5.h> ··· 1518 1517 static int k3_ringacc_probe(struct platform_device *pdev) 1519 1518 { 1520 1519 const struct ringacc_match_data *match_data; 1521 - const struct of_device_id *match; 1522 1520 struct device *dev = &pdev->dev; 1523 1521 struct k3_ringacc *ringacc; 1524 1522 int ret; 1525 1523 1526 - match = of_match_node(k3_ringacc_of_match, dev->of_node); 1527 - if (!match) 1524 + match_data = of_device_get_match_data(&pdev->dev); 1525 + if (!match_data) 1528 1526 return -ENODEV; 1529 - match_data = match->data; 1530 1527 1531 1528 ringacc = devm_kzalloc(dev, sizeof(*ringacc), GFP_KERNEL); 1532 1529 if (!ringacc)