Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: remove unneeded static set .owner field in platform_driver

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>

authored by

zhong jiang and committed by
Greg Kroah-Hartman
faeeeea8 b4a01d8f

-3
-1
drivers/staging/greybus/audio_codec.c
··· 1087 1087 static struct platform_driver gbaudio_codec_driver = { 1088 1088 .driver = { 1089 1089 .name = "apb-dummy-codec", 1090 - .owner = THIS_MODULE, 1091 1090 #ifdef CONFIG_PM 1092 1091 .pm = &gbaudio_codec_pm_ops, 1093 1092 #endif
-1
drivers/staging/mt7621-eth/gsw_mt7621.c
··· 286 286 .remove = mt7621_gsw_remove, 287 287 .driver = { 288 288 .name = "mt7621-gsw", 289 - .owner = THIS_MODULE, 290 289 .of_match_table = mediatek_gsw_match, 291 290 }, 292 291 };
-1
drivers/staging/mt7621-eth/mtk_eth_soc.c
··· 2167 2167 .remove = mtk_remove, 2168 2168 .driver = { 2169 2169 .name = "mtk_soc_eth", 2170 - .owner = THIS_MODULE, 2171 2170 .of_match_table = of_mtk_match, 2172 2171 }, 2173 2172 };