Index: 2.6.11/drivers/pcmcia/Kconfig
===================================================================
--- 2.6.11.orig/drivers/pcmcia/Kconfig	2005-03-02 21:06:28.000000000 +0100
+++ 2.6.11/drivers/pcmcia/Kconfig	2005-03-02 21:45:12.000000000 +0100
@@ -72,6 +72,21 @@
 
 	  If unsure, say Y.
 
+config PCMCIA_IOCTL
+	bool "ioctl interface for cardmgr and cardctl"
+	depends on PCMCIA
+	default y
+	help
+	  If you say Y here, the deprecated ioctl interface to the PCMCIA
+	  subsystem will be built. It is needed by cardmgr and cardctl
+	  (pcmcia-cs) to function properly. 
+
+	  If you do not use the new pcmcia init scripts, and have a
+	  yenta, Cirrus PD6729, i82092, i82365 or tcic compatible bridge,
+	  you need to say Y here to be able to use 16-bit PCMCIA cards.
+
+	  If unsure, say Y.
+
 config CARDBUS
 	bool "32-bit CardBus support"	
 	depends on PCCARD && PCI
Index: 2.6.11/drivers/pcmcia/ds.c
===================================================================
--- 2.6.11.orig/drivers/pcmcia/ds.c	2005-03-02 21:43:54.000000000 +0100
+++ 2.6.11/drivers/pcmcia/ds.c	2005-03-02 21:45:12.000000000 +0100
@@ -116,8 +116,13 @@
 #define DS_SOCKET_DEAD			0x80
 
 /*====================================================================*/
+#ifdef CONFIG_PCMCIA_IOCTL
 
 static int major_dev = -1;
+static struct pcmcia_bus_socket * get_socket_info_by_nr(unsigned int nr);
+static struct pcmcia_driver * get_pcmcia_driver (dev_info_t *dev_info);
+
+#endif
 
 static int unbind_request(struct pcmcia_bus_socket *s);
 
@@ -361,8 +366,6 @@
 
 /*======================================================================*/
 
-static struct pcmcia_driver * get_pcmcia_driver (dev_info_t *dev_info);
-static struct pcmcia_bus_socket * get_socket_info_by_nr(unsigned int nr);
 
 static void pcmcia_release_bus_socket(struct kref *refcount)
 {
@@ -416,6 +419,7 @@
 }
 EXPORT_SYMBOL(pcmcia_unregister_driver);
 
+#ifdef CONFIG_PCMCIA_IOCTL
 #ifdef CONFIG_PROC_FS
 static struct proc_dir_entry *proc_pccard = NULL;
 
@@ -448,6 +452,7 @@
 	return (p - buf);
 }
 #endif
+#endif
 
 /* pcmcia_device handling */
 
@@ -969,6 +974,8 @@
     
 ======================================================================*/
 
+#ifdef CONFIG_PCMCIA_IOCTL
+
 static int queue_empty(user_info_t *user)
 {
     return (user->event_head == user->event_tail);
@@ -995,6 +1002,11 @@
 	queue_event(user, event);
     wake_up_interruptible(&s->queue);
 }
+#else
+static inline void handle_event(struct pcmcia_bus_socket *s, event_t event) { return; }
+static inline int handle_request(struct pcmcia_bus_socket *s, event_t event) { return CS_SUCCESS; }
+#endif
+
 
 
 /*======================================================================
@@ -1113,6 +1125,8 @@
 
 ======================================================================*/
 
+#ifdef CONFIG_PCMCIA_IOCTL
+
 static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
 {
 	struct pcmcia_driver *p_drv;
@@ -1208,6 +1222,8 @@
 	return (ret);
 } /* bind_request */
 
+#endif
+
 
 int pcmcia_register_client(client_handle_t *handle, client_reg_t *req)
 {
@@ -1305,6 +1321,7 @@
 
 
 /*====================================================================*/
+#ifdef CONFIG_PCMCIA_IOCTL
 
 extern struct pci_bus *pcmcia_lookup_bus(struct pcmcia_socket *s);
 
@@ -1393,6 +1410,8 @@
 	return (ret);
 } /* get_device_info */
 
+#endif
+
 /*====================================================================*/
 
 /* unbind _all_ devices attached to a given pcmcia_bus_socket. The
@@ -1466,6 +1485,8 @@
 
 ======================================================================*/
 
+#ifdef CONFIG_PCMCIA_IOCTL
+
 static int ds_open(struct inode *inode, struct file *file)
 {
     socket_t i = iminor(inode);
@@ -1824,6 +1845,8 @@
 	.poll		= ds_poll,
 };
 
+#endif
+
 static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev)
 {
 	struct pcmcia_socket *socket = class_get_devdata(class_dev);
@@ -1909,13 +1932,16 @@
 
 static int __init init_pcmcia_bus(void)
 {
+#ifdef CONFIG_PCMCIA_IOCTL
 	int i;
+#endif
 
 	spin_lock_init(&pcmcia_dev_list_lock);
 
 	bus_register(&pcmcia_bus_type);
 	class_interface_register(&pcmcia_bus_interface);
 
+#ifdef CONFIG_PCMCIA_IOCTL
 	/* Set up character device for user mode clients */
 	i = register_chrdev(0, "pcmcia", &ds_fops);
 	if (i == -EBUSY)
@@ -1929,6 +1955,7 @@
 	if (proc_pccard)
 		create_proc_read_entry("drivers",0,proc_pccard,proc_read_drivers,NULL);
 #endif
+#endif
 
 	return 0;
 }
@@ -1940,6 +1967,7 @@
 {
 	class_interface_unregister(&pcmcia_bus_interface);
 
+#ifdef CONFIG_PCMCIA_IOCTL
 #ifdef CONFIG_PROC_FS
 	if (proc_pccard) {
 		remove_proc_entry("drivers", proc_pccard);
@@ -1948,6 +1976,7 @@
 #endif
 	if (major_dev != -1)
 		unregister_chrdev(major_dev, "pcmcia");
+#endif
 
 	bus_unregister(&pcmcia_bus_type);
 }
@@ -1956,7 +1985,7 @@
 
 
 /* helpers for backwards-compatible functions */
-
+#ifdef CONFIG_PCMCIA_IOCTL
 static struct pcmcia_bus_socket * get_socket_info_by_nr(unsigned int nr)
 {
 	struct pcmcia_socket * s = pcmcia_get_socket_by_nr(nr);
@@ -1981,5 +2010,6 @@
 
 	return (p_drv);
 }
+#endif
 
 MODULE_ALIAS("ds");