diff options
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r-- | drivers/pcmcia/ds.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 21d83a895b21..7f6e94cd067a 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -714,22 +714,26 @@ static int pcmcia_requery(struct device *dev, void * _data) | |||
714 | return 0; | 714 | return 0; |
715 | } | 715 | } |
716 | 716 | ||
717 | static void pcmcia_bus_rescan(struct pcmcia_socket *skt) | 717 | static void pcmcia_bus_rescan(struct pcmcia_socket *skt, int new_cis) |
718 | { | 718 | { |
719 | int no_devices=0; | 719 | int no_devices = 0; |
720 | int ret = 0; | 720 | int ret = 0; |
721 | unsigned long flags; | 721 | unsigned long flags; |
722 | 722 | ||
723 | /* must be called with skt_mutex held */ | 723 | /* must be called with skt_mutex held */ |
724 | spin_lock_irqsave(&pcmcia_dev_list_lock, flags); | 724 | spin_lock_irqsave(&pcmcia_dev_list_lock, flags); |
725 | if (list_empty(&skt->devices_list)) | 725 | if (list_empty(&skt->devices_list)) |
726 | no_devices=1; | 726 | no_devices = 1; |
727 | spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); | 727 | spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); |
728 | 728 | ||
729 | /* If this is because of a CIS override, start over */ | ||
730 | if (new_cis && !no_devices) | ||
731 | pcmcia_card_remove(skt, NULL); | ||
732 | |||
729 | /* if no devices were added for this socket yet because of | 733 | /* if no devices were added for this socket yet because of |
730 | * missing resource information or other trouble, we need to | 734 | * missing resource information or other trouble, we need to |
731 | * do this now. */ | 735 | * do this now. */ |
732 | if (no_devices) { | 736 | if (no_devices || new_cis) { |
733 | ret = pcmcia_card_add(skt); | 737 | ret = pcmcia_card_add(skt); |
734 | if (ret) | 738 | if (ret) |
735 | return; | 739 | return; |