summaryrefslogtreecommitdiff
path: root/drivers/phy/ralink
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-09 12:29:10 -0500
committerVinod Koul <vkoul@kernel.org>2023-10-13 15:45:40 +0530
commit21bf6fc47a1e45031ba8a7084343b7cfd09ed1d3 (patch)
treeb8c8a340fccab45cae639701862502e9c3d8a6fd /drivers/phy/ralink
parent7e909370a5cd44b4c16df500fb40762f48aae966 (diff)
phy: 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 <robh@kernel.org> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20231009172923.2457844-15-robh@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/ralink')
-rw-r--r--drivers/phy/ralink/phy-ralink-usb.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/phy/ralink/phy-ralink-usb.c b/drivers/phy/ralink/phy-ralink-usb.c
index 2bd8ad2e76ed..41bce5290e92 100644
--- a/drivers/phy/ralink/phy-ralink-usb.c
+++ b/drivers/phy/ralink/phy-ralink-usb.c
@@ -13,9 +13,10 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/mutex.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
+#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>
@@ -171,18 +172,13 @@ static int ralink_usb_phy_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct phy_provider *phy_provider;
- const struct of_device_id *match;
struct ralink_usb_phy *phy;
- match = of_match_device(ralink_usb_phy_of_match, &pdev->dev);
- if (!match)
- return -ENODEV;
-
phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
if (!phy)
return -ENOMEM;
- phy->clk = (uintptr_t)match->data;
+ phy->clk = (uintptr_t)device_get_match_data(&pdev->dev);
phy->base = NULL;
phy->sysctl = syscon_regmap_lookup_by_phandle(dev->of_node, "ralink,sysctl");