X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fpcmcia%2Fpcmcia_ioctl.c;h=80969f7e7a0be4eddc31e675ab404e6f144593f3;hb=1107ccfbdef280fedc677af3bdbc405611ba554a;hp=3084d8a3ba411040321a9e085e374476eba512d9;hpb=3448139b41b9e3b8799eed7d427cd50789dadc3e;p=powerpc.git diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 3084d8a3ba..80969f7e7a 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -31,7 +31,6 @@ #include #define IN_CARD_SERVICES -#include #include #include #include @@ -71,29 +70,6 @@ extern int ds_pc_debug; #define ds_dbg(lvl, fmt, arg...) do { } while (0) #endif -static const char *release = "Linux Kernel Card Services"; - -/** pcmcia_get_card_services_info - * - * Return information about this version of Card Services - */ -static int pcmcia_get_card_services_info(servinfo_t *info) -{ - unsigned int socket_count = 0; - struct list_head *tmp; - info->Signature[0] = 'C'; - info->Signature[1] = 'S'; - down_read(&pcmcia_socket_list_rwsem); - list_for_each(tmp, &pcmcia_socket_list) - socket_count++; - up_read(&pcmcia_socket_list_rwsem); - info->Count = socket_count; - info->Revision = CS_RELEASE_CODE; - info->CSLevel = 0x0210; - info->VendorString = (char *)release; - return CS_SUCCESS; -} /* get_card_services_info */ - /* backwards-compatible accessing of driver --- by name! */ @@ -400,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); @@ -431,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; @@ -591,9 +579,6 @@ static int ds_ioctl(struct inode * inode, struct file * file, case DS_ADJUST_RESOURCE_INFO: ret = pcmcia_adjust_resource_info(&buf->adjust); break; - case DS_GET_CARD_SERVICES_INFO: - ret = pcmcia_get_card_services_info(&buf->servinfo); - break; case DS_GET_CONFIGURATION_INFO: if (buf->config.Function && (buf->config.Function >= s->functions)) @@ -760,9 +745,9 @@ void __init pcmcia_setup_ioctl(void) { /* Set up character device for user mode clients */ i = register_chrdev(0, "pcmcia", &ds_fops); - if (i == -EBUSY) + if (i < 0) printk(KERN_NOTICE "unable to find a free device # for " - "Driver Services\n"); + "Driver Services (error=%d)\n", i); else major_dev = i;