aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-06-19 08:33:56 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-07-05 06:37:48 -0400
commite4f1ac2122413736bf2791d3af6533f36b46fc61 (patch)
tree5e082638cb15e8fa4631ccd05ffdd89fec097cbd /drivers
parent815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff)
pcmcia: do not initialize the present flag too late.
The "present" flag was initialized too late -- possibly, a card was already registered at this time, so re-setting the flag to 0 caused pcmcia_dev_present() to fail. Reported-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pcmcia/ds.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 9fc339845538..eac961463be2 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1356,6 +1356,7 @@ static int __devinit pcmcia_bus_add_socket(struct device *dev,
1356 INIT_LIST_HEAD(&socket->devices_list); 1356 INIT_LIST_HEAD(&socket->devices_list);
1357 memset(&socket->pcmcia_state, 0, sizeof(u8)); 1357 memset(&socket->pcmcia_state, 0, sizeof(u8));
1358 socket->device_count = 0; 1358 socket->device_count = 0;
1359 atomic_set(&socket->present, 0);
1359 1360
1360 ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback); 1361 ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback);
1361 if (ret) { 1362 if (ret) {
@@ -1364,8 +1365,6 @@ static int __devinit pcmcia_bus_add_socket(struct device *dev,
1364 return ret; 1365 return ret;
1365 } 1366 }
1366 1367
1367 atomic_set(&socket->present, 0);
1368
1369 return 0; 1368 return 0;
1370} 1369}
1371 1370