[PATCH] pcmcia: warn on IOCTL usage
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 13 Sep 2005 08:25:03 +0000 (01:25 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Sep 2005 15:22:27 +0000 (08:22 -0700)
More visible user information of scheduled feature removal.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pcmcia/pcmcia_ioctl.c

index 39ba6406fd54ef8b9a398eafb3c425a6706837f5..80969f7e7a0be4eddc31e675ab404e6f144593f3 100644 (file)
@@ -376,6 +376,7 @@ static int ds_open(struct inode *inode, struct file *file)
     socket_t i = iminor(inode);
     struct pcmcia_socket *s;
     user_info_t *user;
+    static int warning_printed = 0;
 
     ds_dbg(0, "ds_open(socket %d)\n", i);
 
@@ -407,6 +408,17 @@ static int ds_open(struct inode *inode, struct file *file)
     s->user = user;
     file->private_data = user;
 
+    if (!warning_printed) {
+           printk(KERN_INFO "pcmcia: Detected deprecated PCMCIA ioctl "
+                       "usage.\n");
+           printk(KERN_INFO "pcmcia: This interface will soon be removed from "
+                       "the kernel; please expect breakage unless you upgrade "
+                       "to new tools.\n");
+           printk(KERN_INFO "pcmcia: see http://www.kernel.org/pub/linux/"
+                       "utils/kernel/pcmcia/pcmcia.html for details.\n");
+           warning_printed = 1;
+    }
+
     if (s->pcmcia_state.present)
        queue_event(user, CS_EVENT_CARD_INSERTION);
     return 0;