diff options
author | Rob Herring <robh@kernel.org> | 2023-10-09 20:29:11 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-10-13 13:17:53 +0300 |
commit | dd69a6379a07f21ab1c41360925ef29ebe992a62 (patch) | |
tree | f6907520550dbd10ff9e6d9742cdf9221f7caab8 /drivers/phy/motorola | |
parent | 8b6fba3e79eb67411d2a0a70955e41abc7007210 (diff) | |
download | linux-dd69a6379a07f21ab1c41360925ef29ebe992a62.tar.xz |
phy: Drop unnecessary of_match_device() calls
If probe is reached, we've already matched the device and in the case of
DT matching, the struct device_node pointer will be set. Therefore, there
is no need to call of_match_device() in probe.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231009172923.2457844-16-robh@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/motorola')
-rw-r--r-- | drivers/phy/motorola/phy-cpcap-usb.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c index 74333e814221..7bbf729a7c90 100644 --- a/drivers/phy/motorola/phy-cpcap-usb.c +++ b/drivers/phy/motorola/phy-cpcap-usb.c @@ -15,7 +15,6 @@ #include <linux/io.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_platform.h> #include <linux/iio/consumer.h> #include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> @@ -612,14 +611,8 @@ static int cpcap_usb_phy_probe(struct platform_device *pdev) struct phy *generic_phy; struct phy_provider *phy_provider; struct usb_otg *otg; - const struct of_device_id *of_id; int error; - of_id = of_match_device(of_match_ptr(cpcap_usb_phy_id_table), - &pdev->dev); - if (!of_id) - return -EINVAL; - ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); if (!ddata) return -ENOMEM; |