aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pcmcia_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r--drivers/pcmcia/pcmcia_ioctl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index e8d2c95db1c9..b223f5235de7 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -404,12 +404,12 @@ static int ds_open(struct inode *inode, struct file *file)
404 return -ENODEV; 404 return -ENODEV;
405 405
406 if ((file->f_flags & O_ACCMODE) != O_RDONLY) { 406 if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
407 if (s->state & DS_SOCKET_BUSY) { 407 if (s->pcmcia_state.busy) {
408 pcmcia_put_bus_socket(s); 408 pcmcia_put_bus_socket(s);
409 return -EBUSY; 409 return -EBUSY;
410 } 410 }
411 else 411 else
412 s->state |= DS_SOCKET_BUSY; 412 s->pcmcia_state.busy = 1;
413 } 413 }
414 414
415 user = kmalloc(sizeof(user_info_t), GFP_KERNEL); 415 user = kmalloc(sizeof(user_info_t), GFP_KERNEL);
@@ -424,7 +424,7 @@ static int ds_open(struct inode *inode, struct file *file)
424 s->user = user; 424 s->user = user;
425 file->private_data = user; 425 file->private_data = user;
426 426
427 if (s->state & DS_SOCKET_PRESENT) 427 if (s->pcmcia_state.present)
428 queue_event(user, CS_EVENT_CARD_INSERTION); 428 queue_event(user, CS_EVENT_CARD_INSERTION);
429 return 0; 429 return 0;
430} /* ds_open */ 430} /* ds_open */
@@ -446,7 +446,7 @@ static int ds_release(struct inode *inode, struct file *file)
446 446
447 /* Unlink user data structure */ 447 /* Unlink user data structure */
448 if ((file->f_flags & O_ACCMODE) != O_RDONLY) { 448 if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
449 s->state &= ~DS_SOCKET_BUSY; 449 s->pcmcia_state.busy = 0;
450 } 450 }
451 file->private_data = NULL; 451 file->private_data = NULL;
452 for (link = &s->user; *link; link = &(*link)->next) 452 for (link = &s->user; *link; link = &(*link)->next)
@@ -480,7 +480,7 @@ static ssize_t ds_read(struct file *file, char __user *buf,
480 return -EIO; 480 return -EIO;
481 481
482 s = user->socket; 482 s = user->socket;
483 if (s->state & DS_SOCKET_DEAD) 483 if (s->pcmcia_state.dead)
484 return -EIO; 484 return -EIO;
485 485
486 ret = wait_event_interruptible(s->queue, !queue_empty(user)); 486 ret = wait_event_interruptible(s->queue, !queue_empty(user));
@@ -550,7 +550,7 @@ static int ds_ioctl(struct inode * inode, struct file * file,
550 return -EIO; 550 return -EIO;
551 551
552 s = user->socket; 552 s = user->socket;
553 if (s->state & DS_SOCKET_DEAD) 553 if (s->pcmcia_state.dead)
554 return -EIO; 554 return -EIO;
555 555
556 size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; 556 size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;