Skip to content

Commit

Permalink
[PATCH] pcmcia: warn on IOCTL usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dominik Brodowski authored and Linus Torvalds committed Sep 13, 2005
1 parent db84502 commit c352ec8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/pcmcia/pcmcia_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c352ec8

Please sign in to comment.