diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb3.c b/drivers/phy/rockchip/phy-rockchip-inno-usb3.c index f345f23afbd1..9fdf3005e2d0 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb3.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb3.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -827,12 +828,11 @@ static int rockchip_u3phy_probe(struct platform_device *pdev) struct phy_provider *provider; struct rockchip_u3phy *u3phy; const struct rockchip_u3phy_cfg *phy_cfgs; - const struct of_device_id *match; unsigned int reg[2]; int index, ret; - match = of_match_device(dev->driver->of_match_table, dev); - if (!match || !match->data) { + phy_cfgs = device_get_match_data(dev); + if (!phy_cfgs) { dev_err(dev, "phy-cfgs are not assigned!\n"); return -EINVAL; } @@ -861,7 +861,6 @@ static int rockchip_u3phy_probe(struct platform_device *pdev) u3phy->dev = dev; u3phy->vbus_enabled = false; - phy_cfgs = match->data; platform_set_drvdata(pdev, u3phy); /* find out a proper config which can be matched with dt. */