aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/tifm_7xx1.c
diff options
context:
space:
mode:
authorAlex Dubov <oakad@yahoo.com>2006-12-08 00:50:51 -0500
committerPierre Ossman <drzeus@drzeus.cx>2007-02-04 14:54:07 -0500
commit8e02f8581cd2f9c12a03be7641d5c2c427170feb (patch)
treeeef042716811ef6dcb15be51352a2405a6cc4a96 /drivers/misc/tifm_7xx1.c
parent83d420ba92bdd52127e4548ae8050a48f655ce3b (diff)
tifm_sd: restructure initialization, removal and command handling
In order to support correct suspend and resume several changes were needed: 1. Switch from work_struct to tasklet for command handling. When device suspend is called workqueues are already frozen and can not be used. 2. Separate host initialization code from driver's probe and don't rely on interrupts for host initialization. This, in turn, addresses two problems: a) Resume needs to re-initialize the host, but can not assume that device interrupts were already re-armed. b) Previously, probe will return successfully before really knowing the state of the host, as host interrupts were not armed in time. Now it uses polling to determine the real host state before returning. 3. Separate termination code from driver's remove. Termination may be caused by resume, if media changed type or became unavailable during suspend. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/misc/tifm_7xx1.c')
-rw-r--r--drivers/misc/tifm_7xx1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
index 2ab7add78f94..50c4cdabb654 100644
--- a/drivers/misc/tifm_7xx1.c
+++ b/drivers/misc/tifm_7xx1.c
@@ -201,11 +201,12 @@ static void tifm_7xx1_insert_media(struct work_struct *work)
201 fm->max_sockets == 2); 201 fm->max_sockets == 2);
202 if (media_id) { 202 if (media_id) {
203 ok_to_register = 0; 203 ok_to_register = 0;
204 new_sock = tifm_alloc_device(fm, cnt); 204 new_sock = tifm_alloc_device(fm);
205 if (new_sock) { 205 if (new_sock) {
206 new_sock->addr = tifm_7xx1_sock_addr(fm->addr, 206 new_sock->addr = tifm_7xx1_sock_addr(fm->addr,
207 cnt); 207 cnt);
208 new_sock->media_id = media_id; 208 new_sock->media_id = media_id;
209 new_sock->socket_id = cnt;
209 switch (media_id) { 210 switch (media_id) {
210 case 1: 211 case 1:
211 card_name = "xd"; 212 card_name = "xd";