usb: gadget: udc: Remove redundant initialization for udc_driver
authorLi Zetao <lizetao1@huawei.com>
Thu, 3 Aug 2023 03:28:38 +0000 (11:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 12:46:40 +0000 (14:46 +0200)
There is a warning reported by coccinelle:

./drivers/usb/gadget/udc/renesas_usbf.c:3381:3-8:
No need to set .owner here. The core will do it.

The module_platform_driver() will set "THIS_MODULE" to driver.owner
when register a driver for platform-level devices, so it is redundant
initialization to set driver.owner in udc_driver statement. Remove it
to silence the warning.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20230803032838.3045730-1-lizetao1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/renesas_usbf.c

index 3482b41..657f265 100644 (file)
@@ -3378,7 +3378,6 @@ MODULE_DEVICE_TABLE(of, usbf_match);
 static struct platform_driver udc_driver = {
        .driver = {
                .name = "usbf_renesas",
-               .owner = THIS_MODULE,
                .of_match_table = usbf_match,
        },
        .probe          = usbf_probe,