Skip to content

Commit 15d0a87

Browse files
mzyngierDominik Brodowski
authored andcommitted
pcmcia: fix compilation after 16bit state locking changes
Commit 04de081 (pcmcia: pcmcia_dev_present bugfix) broke the deprecated ioctl layer. Fix it by getting rid of references to unexisting fields. Signed-off-by: Marc Zyngier <maz@misterjones.org> Reported-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
1 parent 4382124 commit 15d0a87

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/pcmcia/pcmcia_ioctl.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ static int ds_open(struct inode *inode, struct file *file)
711711
warning_printed = 1;
712712
}
713713

714-
if (s->pcmcia_state.present)
714+
if (atomic_read(&s->present))
715715
queue_event(user, CS_EVENT_CARD_INSERTION);
716716
out:
717717
unlock_kernel();
@@ -770,9 +770,6 @@ static ssize_t ds_read(struct file *file, char __user *buf,
770770
return -EIO;
771771

772772
s = user->socket;
773-
if (s->pcmcia_state.dead)
774-
return -EIO;
775-
776773
ret = wait_event_interruptible(s->queue, !queue_empty(user));
777774
if (ret == 0)
778775
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,
838835
return -EIO;
839836

840837
s = user->socket;
841-
if (s->pcmcia_state.dead)
842-
return -EIO;
843838

844839
size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;
845840
if (size > sizeof(ds_ioctl_arg_t))

0 commit comments

Comments
 (0)