diff options
Diffstat (limited to 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 104e73d5d86c..7631faa0cadd 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -711,7 +711,7 @@ static int ds_open(struct inode *inode, struct file *file) | |||
711 | warning_printed = 1; | 711 | warning_printed = 1; |
712 | } | 712 | } |
713 | 713 | ||
714 | if (s->pcmcia_state.present) | 714 | if (atomic_read(&s->present)) |
715 | queue_event(user, CS_EVENT_CARD_INSERTION); | 715 | queue_event(user, CS_EVENT_CARD_INSERTION); |
716 | out: | 716 | out: |
717 | unlock_kernel(); | 717 | unlock_kernel(); |
@@ -770,9 +770,6 @@ static ssize_t ds_read(struct file *file, char __user *buf, | |||
770 | return -EIO; | 770 | return -EIO; |
771 | 771 | ||
772 | s = user->socket; | 772 | s = user->socket; |
773 | if (s->pcmcia_state.dead) | ||
774 | return -EIO; | ||
775 | |||
776 | ret = wait_event_interruptible(s->queue, !queue_empty(user)); | 773 | ret = wait_event_interruptible(s->queue, !queue_empty(user)); |
777 | if (ret == 0) | 774 | if (ret == 0) |
778 | ret = put_user(get_queued_event(user), (int __user *)buf) ? -EFAULT : 4; | 775 | ret = put_user(get_queued_event(user), (int __user *)buf) ? -EFAULT : 4; |
@@ -838,8 +835,6 @@ static int ds_ioctl(struct inode *inode, struct file *file, | |||
838 | return -EIO; | 835 | return -EIO; |
839 | 836 | ||
840 | s = user->socket; | 837 | s = user->socket; |
841 | if (s->pcmcia_state.dead) | ||
842 | return -EIO; | ||
843 | 838 | ||
844 | size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; | 839 | size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; |
845 | if (size > sizeof(ds_ioctl_arg_t)) | 840 | if (size > sizeof(ds_ioctl_arg_t)) |