diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-05-24 00:29:57 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-05-24 00:29:57 -0400 |
commit | db21e578e551421d76641d72cb3f8296ed3f9e61 (patch) | |
tree | 73968aeda7ed0051b5cff6950ad513011a3c7a5f /drivers/net/wireless/spectrum_cs.c | |
parent | 6ed14254cb6e269030ff09bed8673473b7be0283 (diff) | |
parent | df8ccb9bf1ca360581a94c2245efb9fa613fbb29 (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
Diffstat (limited to 'drivers/net/wireless/spectrum_cs.c')
-rw-r--r-- | drivers/net/wireless/spectrum_cs.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index aeb38d938832..7f9aa139c347 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -625,14 +625,11 @@ static void spectrum_cs_detach(struct pcmcia_device *link) | |||
625 | { | 625 | { |
626 | struct net_device *dev = link->priv; | 626 | struct net_device *dev = link->priv; |
627 | 627 | ||
628 | if (link->dev_node) | ||
629 | unregister_netdev(dev); | ||
630 | |||
628 | spectrum_cs_release(link); | 631 | spectrum_cs_release(link); |
629 | 632 | ||
630 | DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node); | ||
631 | if (link->dev_node) { | ||
632 | DEBUG(0, PFX "About to unregister net device %p\n", | ||
633 | dev); | ||
634 | unregister_netdev(dev); | ||
635 | } | ||
636 | free_orinocodev(dev); | 633 | free_orinocodev(dev); |
637 | } /* spectrum_cs_detach */ | 634 | } /* spectrum_cs_detach */ |
638 | 635 | ||
@@ -825,19 +822,10 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
825 | net_device has been registered */ | 822 | net_device has been registered */ |
826 | 823 | ||
827 | /* Finally, report what we've done */ | 824 | /* Finally, report what we've done */ |
828 | printk(KERN_DEBUG "%s: index 0x%02x: ", | 825 | printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io " |
829 | dev->name, link->conf.ConfigIndex); | 826 | "0x%04x-0x%04x\n", dev->name, dev->class_dev.dev->bus_id, |
830 | if (link->conf.Vpp) | 827 | link->irq.AssignedIRQ, link->io.BasePort1, |
831 | printk(", Vpp %d.%d", link->conf.Vpp / 10, | 828 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
832 | link->conf.Vpp % 10); | ||
833 | printk(", irq %d", link->irq.AssignedIRQ); | ||
834 | if (link->io.NumPorts1) | ||
835 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | ||
836 | link->io.BasePort1 + link->io.NumPorts1 - 1); | ||
837 | if (link->io.NumPorts2) | ||
838 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
839 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
840 | printk("\n"); | ||
841 | 829 | ||
842 | return 0; | 830 | return 0; |
843 | 831 | ||
@@ -878,11 +866,10 @@ spectrum_cs_suspend(struct pcmcia_device *link) | |||
878 | { | 866 | { |
879 | struct net_device *dev = link->priv; | 867 | struct net_device *dev = link->priv; |
880 | struct orinoco_private *priv = netdev_priv(dev); | 868 | struct orinoco_private *priv = netdev_priv(dev); |
881 | unsigned long flags; | ||
882 | int err = 0; | 869 | int err = 0; |
883 | 870 | ||
884 | /* Mark the device as stopped, to block IO until later */ | 871 | /* Mark the device as stopped, to block IO until later */ |
885 | spin_lock_irqsave(&priv->lock, flags); | 872 | spin_lock(&priv->lock); |
886 | 873 | ||
887 | err = __orinoco_down(dev); | 874 | err = __orinoco_down(dev); |
888 | if (err) | 875 | if (err) |
@@ -892,9 +879,9 @@ spectrum_cs_suspend(struct pcmcia_device *link) | |||
892 | netif_device_detach(dev); | 879 | netif_device_detach(dev); |
893 | priv->hw_unavailable++; | 880 | priv->hw_unavailable++; |
894 | 881 | ||
895 | spin_unlock_irqrestore(&priv->lock, flags); | 882 | spin_unlock(&priv->lock); |
896 | 883 | ||
897 | return 0; | 884 | return err; |
898 | } | 885 | } |
899 | 886 | ||
900 | static int | 887 | static int |