diff options
author | Rob Herring <robh@kernel.org> | 2023-10-09 16:13:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-10 08:55:23 +0200 |
commit | 14485de431b0a860d3a117fe518ce9ede8c76732 (patch) | |
tree | 2bc4f736da0b87977b54d8a0b3af97fd1db16291 /drivers/usb/misc | |
parent | c19473d28235a54e92821e927cb55690ad7c5279 (diff) | |
download | linux-14485de431b0a860d3a117fe518ce9ede8c76732.tar.gz linux-14485de431b0a860d3a117fe518ce9ede8c76732.tar.bz2 linux-14485de431b0a860d3a117fe518ce9ede8c76732.zip |
usb: 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>
Link: https://lore.kernel.org/r/20231009211356.3242037-16-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/onboard_usb_hub.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index 3da1a4659c5f..a22fa3e22584 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -240,7 +240,6 @@ static void onboard_hub_attach_usb_driver(struct work_struct *work) static int onboard_hub_probe(struct platform_device *pdev) { - const struct of_device_id *of_id; struct device *dev = &pdev->dev; struct onboard_hub *hub; unsigned int i; @@ -250,11 +249,7 @@ static int onboard_hub_probe(struct platform_device *pdev) if (!hub) return -ENOMEM; - of_id = of_match_device(onboard_hub_match, &pdev->dev); - if (!of_id) - return -ENODEV; - - hub->pdata = of_id->data; + hub->pdata = device_get_match_data(&pdev->dev); if (!hub->pdata) return -EINVAL; |