diff options
author | Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> | 2022-02-14 05:06:26 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2022-02-25 11:28:12 +0300 |
commit | 10c573c61338d80c271f3579da22772c483d8a7a (patch) | |
tree | 61bbf981d98f5e480d7114c0f9482cd7e648d147 /drivers/phy/cadence | |
parent | 204642e7de220a009e02f386b652f02078422959 (diff) | |
download | linux-10c573c61338d80c271f3579da22772c483d8a7a.tar.xz |
phy/cadence: Use of_device_get_match_data()
Use of_device_get_match_data() instead of open-coding it.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220214020626.1714696-1-chi.minghao@zte.com.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/cadence')
-rw-r--r-- | drivers/phy/cadence/phy-cadence-salvo.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/phy/cadence/phy-cadence-salvo.c b/drivers/phy/cadence/phy-cadence-salvo.c index 51c0b98f5fd7..e569f5f67578 100644 --- a/drivers/phy/cadence/phy-cadence-salvo.c +++ b/drivers/phy/cadence/phy-cadence-salvo.c @@ -263,14 +263,9 @@ static int cdns_salvo_phy_probe(struct platform_device *pdev) struct phy_provider *phy_provider; struct device *dev = &pdev->dev; struct cdns_salvo_phy *salvo_phy; - const struct of_device_id *match; struct cdns_salvo_data *data; - match = of_match_device(cdns_salvo_phy_of_match, dev); - if (!match) - return -EINVAL; - - data = (struct cdns_salvo_data *)match->data; + data = (struct cdns_salvo_data *)of_device_get_match_data(dev); salvo_phy = devm_kzalloc(dev, sizeof(*salvo_phy), GFP_KERNEL); if (!salvo_phy) return -ENOMEM; |