Commit 56b854bb authored by James Bottomley's avatar James Bottomley

[SCSI] fcoe: fix incorrect use of struct module

This structure may not be defined if CONFIG_MODULE=n, so never deref
it.  Change uses of module->name to module_name(module) and corrects
some dyslexic printks and docbook comments.
Reported-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Cc: Robert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 73c33674
...@@ -166,7 +166,7 @@ static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action, ...@@ -166,7 +166,7 @@ static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action,
#endif /* CONFIG_HOTPLUG_CPU */ #endif /* CONFIG_HOTPLUG_CPU */
/** /**
* foce_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ * fcoe_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
* @skb: the receive skb * @skb: the receive skb
* @dev: associated net device * @dev: associated net device
* @ptype: context * @ptype: context
...@@ -991,8 +991,8 @@ static int fcoe_ethdrv_get(const struct net_device *netdev) ...@@ -991,8 +991,8 @@ static int fcoe_ethdrv_get(const struct net_device *netdev)
owner = fcoe_netdev_to_module_owner(netdev); owner = fcoe_netdev_to_module_owner(netdev);
if (owner) { if (owner) {
printk(KERN_DEBUG "foce:hold driver module %s for %s\n", printk(KERN_DEBUG "fcoe:hold driver module %s for %s\n",
owner->name, netdev->name); module_name(owner), netdev->name);
return try_module_get(owner); return try_module_get(owner);
} }
return -ENODEV; return -ENODEV;
...@@ -1011,8 +1011,8 @@ static int fcoe_ethdrv_put(const struct net_device *netdev) ...@@ -1011,8 +1011,8 @@ static int fcoe_ethdrv_put(const struct net_device *netdev)
owner = fcoe_netdev_to_module_owner(netdev); owner = fcoe_netdev_to_module_owner(netdev);
if (owner) { if (owner) {
printk(KERN_DEBUG "foce:release driver module %s for %s\n", printk(KERN_DEBUG "fcoe:release driver module %s for %s\n",
owner->name, netdev->name); module_name(owner), netdev->name);
module_put(owner); module_put(owner);
return 0; return 0;
} }
......
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