Commit bb8dc3df authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Greg Kroah-Hartman

usb: gadget/snps_udc_plat: Remove redundant of_match_ptr()

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr() here. Remove of_match_ptr() and CONFIG_OF.
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230809084849.2410477-1-ruanjinjie@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f176638a
...@@ -300,7 +300,6 @@ static const struct dev_pm_ops udc_plat_pm_ops = { ...@@ -300,7 +300,6 @@ static const struct dev_pm_ops udc_plat_pm_ops = {
}; };
#endif #endif
#if defined(CONFIG_OF)
static const struct of_device_id of_udc_match[] = { static const struct of_device_id of_udc_match[] = {
{ .compatible = "brcm,ns2-udc", }, { .compatible = "brcm,ns2-udc", },
{ .compatible = "brcm,cygnus-udc", }, { .compatible = "brcm,cygnus-udc", },
...@@ -308,14 +307,13 @@ static const struct of_device_id of_udc_match[] = { ...@@ -308,14 +307,13 @@ static const struct of_device_id of_udc_match[] = {
{ } { }
}; };
MODULE_DEVICE_TABLE(of, of_udc_match); MODULE_DEVICE_TABLE(of, of_udc_match);
#endif
static struct platform_driver udc_plat_driver = { static struct platform_driver udc_plat_driver = {
.probe = udc_plat_probe, .probe = udc_plat_probe,
.remove_new = udc_plat_remove, .remove_new = udc_plat_remove,
.driver = { .driver = {
.name = "snps-udc-plat", .name = "snps-udc-plat",
.of_match_table = of_match_ptr(of_udc_match), .of_match_table = of_udc_match,
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
.pm = &udc_plat_pm_ops, .pm = &udc_plat_pm_ops,
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment