aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 16:45:41 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-30 14:08:37 -0500
commit56b854bb314084396d3d3138126496d330943559 (patch)
treedcd1b29760738bfc670239949e7ab06b79271c96 /drivers
parent73c336740362731983bf7fd747cdd3b6ac593cef (diff)
[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: Randy Dunlap <randy.dunlap@oracle.com> Cc: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 1cb549c4fac4..e419f486cdb3 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -166,7 +166,7 @@ static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action,
166#endif /* CONFIG_HOTPLUG_CPU */ 166#endif /* CONFIG_HOTPLUG_CPU */
167 167
168/** 168/**
169 * foce_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ 169 * fcoe_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
170 * @skb: the receive skb 170 * @skb: the receive skb
171 * @dev: associated net device 171 * @dev: associated net device
172 * @ptype: context 172 * @ptype: context
@@ -991,8 +991,8 @@ static int fcoe_ethdrv_get(const struct net_device *netdev)
991 991
992 owner = fcoe_netdev_to_module_owner(netdev); 992 owner = fcoe_netdev_to_module_owner(netdev);
993 if (owner) { 993 if (owner) {
994 printk(KERN_DEBUG "foce:hold driver module %s for %s\n", 994 printk(KERN_DEBUG "fcoe:hold driver module %s for %s\n",
995 owner->name, netdev->name); 995 module_name(owner), netdev->name);
996 return try_module_get(owner); 996 return try_module_get(owner);
997 } 997 }
998 return -ENODEV; 998 return -ENODEV;
@@ -1011,8 +1011,8 @@ static int fcoe_ethdrv_put(const struct net_device *netdev)
1011 1011
1012 owner = fcoe_netdev_to_module_owner(netdev); 1012 owner = fcoe_netdev_to_module_owner(netdev);
1013 if (owner) { 1013 if (owner) {
1014 printk(KERN_DEBUG "foce:release driver module %s for %s\n", 1014 printk(KERN_DEBUG "fcoe:release driver module %s for %s\n",
1015 owner->name, netdev->name); 1015 module_name(owner), netdev->name);
1016 module_put(owner); 1016 module_put(owner);
1017 return 0; 1017 return 0;
1018 } 1018 }