[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100730175151.585749455@clark.site>
Date: Fri, 30 Jul 2010 10:53:32 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Dominik Brodowski <linux@...inikbrodowski.net>
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@...inikbrodowski.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@...hat.com>
Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists