staging: remove unneeded static set .owner field in platform_driver
authorzhong jiang <zhongjiang@huawei.com>
Wed, 12 Sep 2018 03:40:28 +0000 (11:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2018 08:45:51 +0000 (10:45 +0200)
platform_driver_register will set the .owner field. So it is safe
to remove the redundant assignment.

The issue is detected with the help of Coccinelle.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/audio_codec.c
drivers/staging/mt7621-eth/gsw_mt7621.c
drivers/staging/mt7621-eth/mtk_eth_soc.c

index 35acd55..08746c8 100644 (file)
@@ -1087,7 +1087,6 @@ static const struct of_device_id greybus_asoc_machine_of_match[]  = {
 static struct platform_driver gbaudio_codec_driver = {
        .driver = {
                .name = "apb-dummy-codec",
-               .owner = THIS_MODULE,
 #ifdef CONFIG_PM
                .pm = &gbaudio_codec_pm_ops,
 #endif
index 2c07b55..53767b1 100644 (file)
@@ -286,7 +286,6 @@ static struct platform_driver gsw_driver = {
        .remove = mt7621_gsw_remove,
        .driver = {
                .name = "mt7621-gsw",
-               .owner = THIS_MODULE,
                .of_match_table = mediatek_gsw_match,
        },
 };
index 7135075..363d3c9 100644 (file)
@@ -2167,7 +2167,6 @@ static struct platform_driver mtk_driver = {
        .remove = mtk_remove,
        .driver = {
                .name = "mtk_soc_eth",
-               .owner = THIS_MODULE,
                .of_match_table = of_mtk_match,
        },
 };