From: Greg KH on
2.6.34-stable review patch. If anyone has any objections, please let us know.

------------------

From: Dominik Brodowski <linux(a)dominikbrodowski.net>

commit e4f1ac2122413736bf2791d3af6533f36b46fc61 upstream.

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(a)redhat.com>
Signed-off-by: Dominik Brodowski <linux(a)dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de>

---
drivers/pcmcia/ds.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1366,6 +1366,7 @@ static int __devinit pcmcia_bus_add_sock
INIT_LIST_HEAD(&socket->devices_list);
memset(&socket->pcmcia_state, 0, sizeof(u8));
socket->device_count = 0;
+ atomic_set(&socket->present, 0);

ret = pccard_register_pcmcia(socket, &pcmcia_bus_callback);
if (ret) {
@@ -1374,8 +1375,6 @@ static int __devinit pcmcia_bus_add_sock
return ret;
}

- atomic_set(&socket->present, 0);
-
return 0;
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/