lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[195/205] pcmcia: do not initialize the present flag too late.
2.6.34-stable review patch.  If anyone has any objections, please let us know.

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

From: Dominik Brodowski <linux@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@redhat.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@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;
}




\
 
 \ /
  Last update: 2010-07-30 20:07    [W:0.447 / U:1.328 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site