From b5e43913cfe95a18ad8929585a0bb58e46cf3390 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 27 Jun 2005 16:28:50 -0700 Subject: [PATCH] pcmcia: make PCMCIA status a bitfield make pcmcia_bus_socket->state a bitfield, and rename it pcmcia_state to prepare for struct pcmcia_bus_socket integration into struct pcmcia_socket. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pcmcia/pcmcia_ioctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/pcmcia/pcmcia_ioctl.c') 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) return -ENODEV; if ((file->f_flags & O_ACCMODE) != O_RDONLY) { - if (s->state & DS_SOCKET_BUSY) { + if (s->pcmcia_state.busy) { pcmcia_put_bus_socket(s); return -EBUSY; } else - s->state |= DS_SOCKET_BUSY; + s->pcmcia_state.busy = 1; } user = kmalloc(sizeof(user_info_t), GFP_KERNEL); @@ -424,7 +424,7 @@ static int ds_open(struct inode *inode, struct file *file) s->user = user; file->private_data = user; - if (s->state & DS_SOCKET_PRESENT) + if (s->pcmcia_state.present) queue_event(user, CS_EVENT_CARD_INSERTION); return 0; } /* ds_open */ @@ -446,7 +446,7 @@ static int ds_release(struct inode *inode, struct file *file) /* Unlink user data structure */ if ((file->f_flags & O_ACCMODE) != O_RDONLY) { - s->state &= ~DS_SOCKET_BUSY; + s->pcmcia_state.busy = 0; } file->private_data = NULL; for (link = &s->user; *link; link = &(*link)->next) @@ -480,7 +480,7 @@ static ssize_t ds_read(struct file *file, char __user *buf, return -EIO; s = user->socket; - if (s->state & DS_SOCKET_DEAD) + if (s->pcmcia_state.dead) return -EIO; ret = wait_event_interruptible(s->queue, !queue_empty(user)); @@ -550,7 +550,7 @@ static int ds_ioctl(struct inode * inode, struct file * file, return -EIO; s = user->socket; - if (s->state & DS_SOCKET_DEAD) + if (s->pcmcia_state.dead) return -EIO; size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT; -- cgit v1.2.3