diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 54068f4..85e2cb2 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -622,14 +622,14 @@
 {
 	struct pcmcia_bus_socket *s = data;
 	pcmcia_device_add(s, 0);
-	s->device_add_pending = 0;
+	s->pcmcia_state.device_add_pending = 0;
 }
 
 static inline void pcmcia_add_pseudo_device(struct pcmcia_bus_socket *s)
 {
-	if (!s->device_add_pending) {
+	if (!s->pcmcia_state.device_add_pending) {
 		schedule_work(&s->device_add);
-		s->device_add_pending = 1;
+		s->pcmcia_state.device_add_pending = 1;
 	}
 	return;
 }
@@ -981,14 +981,14 @@
 	switch (event) {
 
 	case CS_EVENT_CARD_REMOVAL:
-		s->state &= ~DS_SOCKET_PRESENT;
+		s->pcmcia_state.present = 0;
 	    	send_event(skt, event, priority);
 		unbind_request(s);
 		handle_event(s, event);
 		break;
 	
 	case CS_EVENT_CARD_INSERTION:
-		s->state |= DS_SOCKET_PRESENT;
+		s->pcmcia_state.present = 1;
 		pcmcia_card_add(skt);
 		handle_event(s, event);
 		break;
@@ -1229,7 +1229,7 @@
 
 	pccard_register_pcmcia(socket, NULL);
 
-	socket->pcmcia->state |= DS_SOCKET_DEAD;
+	socket->pcmcia->pcmcia_state.dead = 1;
 	pcmcia_put_bus_socket(socket->pcmcia);
 	socket->pcmcia = NULL;
 
diff --git a/drivers/pcmcia/ds_internal.h b/drivers/pcmcia/ds_internal.h
index b05bc39..2c3bb18 100644
--- a/drivers/pcmcia/ds_internal.h
+++ b/drivers/pcmcia/ds_internal.h
@@ -5,7 +5,6 @@
 /* Socket state information */
 struct pcmcia_bus_socket {
 	struct kref		refcount;
-	int			state;
 	struct pcmcia_socket	*parent;
 
 	/* the PCMCIA devices connected to this socket (normally one, more
@@ -15,7 +14,14 @@
 					       * only internally and subject
 					       * to incorrectness and change */
 
-	u8			device_add_pending;
+	struct {
+		u8		present:1,
+				busy:1,
+				dead:1,
+				device_add_pending:1,
+				reserved:4;
+	} 			pcmcia_state;
+
 	struct work_struct	device_add;
 
 
@@ -29,10 +35,6 @@
 extern struct bus_type pcmcia_bus_type;
 
 
-#define DS_SOCKET_PRESENT		0x01
-#define DS_SOCKET_BUSY			0x02
-#define DS_SOCKET_DEAD			0x80
-
 extern struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev);
 extern void pcmcia_put_dev(struct pcmcia_device *p_dev);
 
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index e8d2c95..b223f52 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -404,12 +404,12 @@
 	    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 @@
     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 @@
 
     /* 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 @@
 	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 @@
 	return -EIO;
 
     s = user->socket;
-    if (s->state & DS_SOCKET_DEAD)
+    if (s->pcmcia_state.dead)
         return -EIO;
 
     size = (cmd & IOCSIZE_MASK) >> IOCSIZE_SHIFT;
