diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2012-02-03 11:35:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-04 15:59:29 -0500 |
commit | b8c30812b479a53b717ad665728df55d30f784d5 (patch) | |
tree | 59f6d7c56eb6467fb465a7eb9842675da25e6959 /drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | |
parent | 5471aed0259298e4e258b8a9e403ebdf88ebcd56 (diff) | |
download | op-kernel-dev-b8c30812b479a53b717ad665728df55d30f784d5.zip op-kernel-dev-b8c30812b479a53b717ad665728df55d30f784d5.tar.gz |
netxen: Fix a panic during driver unload in device_remove_file
o Pass adapter->pdev->dev instead of netdev->dev
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index f517c16..8dc4a134 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c @@ -2930,13 +2930,12 @@ static struct bin_attribute bin_attr_mem = { static void netxen_create_sysfs_entries(struct netxen_adapter *adapter) { - struct net_device *netdev = adapter->netdev; - struct device *dev = &netdev->dev; + struct device *dev = &adapter->pdev->dev; if (adapter->capabilities & NX_FW_CAPABILITY_BDG) { /* bridged_mode control */ if (device_create_file(dev, &dev_attr_bridged_mode)) { - dev_warn(&netdev->dev, + dev_warn(dev, "failed to create bridged_mode sysfs entry\n"); } } @@ -2945,8 +2944,7 @@ netxen_create_sysfs_entries(struct netxen_adapter *adapter) static void netxen_remove_sysfs_entries(struct netxen_adapter *adapter) { - struct net_device *netdev = adapter->netdev; - struct device *dev = &netdev->dev; + struct device *dev = &adapter->pdev->dev; if (adapter->capabilities & NX_FW_CAPABILITY_BDG) device_remove_file(dev, &dev_attr_bridged_mode); |