Skip to contentSkip to conversation

ethernet: moxa: fix incorrect placement of __initdata tag

PATCH Applied Bartlomiej Zolnierkiewicz 2 participants 2 messages Sep 30, 2013 – Oct 1, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethernet: moxa: fix incorrect placement of __initdata tag

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

In this particular case __initdata is incorrect as moxart_mac_driver can be used after the driver gets initialized.

Also while at it static-ize moxart_mac_driver.

---
 drivers/net/ethernet/moxa/moxart_ether.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/moxa/moxart_ether.c +1 -1
index 83c2091..bd1a2d2 100644
@@ -543,7 +543,7 @@ static const struct of_device_id moxart_mac_match[] = {
 	{ }
 };
 
-struct __initdata platform_driver moxart_mac_driver = {
+static struct platform_driver moxart_mac_driver = {
 	.probe	= moxart_mac_probe,
 	.remove	= moxart_remove,
 	.driver	= {
Signature · 1 line
1.8.2.3
maintainer Applied
#1 lore raw

From: Bartlomiej Zolnierkiewicz <[email protected]>
Date: Mon, 30 Sep 2013 15:18:27 +0200

Quoted 10 lines

__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section.

In this particular case __initdata is incorrect as moxart_mac_driver can be used after the driver gets initialized.

Also while at it static-ize moxart_mac_driver.

Applied, thanks.