diff options
author | Pavel Roskin <proski@gnu.org> | 2005-07-07 20:59:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:24:06 -0400 |
commit | a00db1ba7c33619cbd7c3153e4746d15881c0383 (patch) | |
tree | 5cb3bbbd8b9fd03947c75b7bdfede1db27c9d6b6 | |
parent | 2bc5a9bdc56fac6f7cbf95b89443e3809141c247 (diff) |
[PATCH] pcmcia: remove client services version
The Linux PCMCIA code has some data that was apparently used (or meant to be
used) to ensure that only proper client drivers are loaded. This is now
ensured (to a certain degree) by the fact that the most client drivers are
part of the kernel. Also, the version information has not been updated
despite major changes in PCMCIA API. This has made it meaningless.
This patch removes servinfo_t and pcmcia_get_card_services_info. They are not
used in any userspace utilities such as pcmcia-cs and pcmciautils.
drivers/pcmcia/pcmcia_ioctl.c is adjusted accordingly.
CS_RELEASE and CS_RELEASE_CODE are removed. include/pcmcia/version.h is empty
now. It will be removed later, but for now it's left in the tree to avoid
touching all PCMCIA clients.
The only driver that needs to be changed is drivers/scsi/pcmcia/nsp_cs.c,
which uses CS_RELEASE_CODE.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 26 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 4 | ||||
-rw-r--r-- | include/pcmcia/cs.h | 8 | ||||
-rw-r--r-- | include/pcmcia/ds.h | 2 | ||||
-rw-r--r-- | include/pcmcia/version.h | 3 |
5 files changed, 1 insertions, 42 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index b883bc151ed0..ee02224dd774 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -71,29 +71,6 @@ extern int ds_pc_debug; | |||
71 | #define ds_dbg(lvl, fmt, arg...) do { } while (0) | 71 | #define ds_dbg(lvl, fmt, arg...) do { } while (0) |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | static const char *release = "Linux Kernel Card Services"; | ||
75 | |||
76 | /** pcmcia_get_card_services_info | ||
77 | * | ||
78 | * Return information about this version of Card Services | ||
79 | */ | ||
80 | static int pcmcia_get_card_services_info(servinfo_t *info) | ||
81 | { | ||
82 | unsigned int socket_count = 0; | ||
83 | struct list_head *tmp; | ||
84 | info->Signature[0] = 'C'; | ||
85 | info->Signature[1] = 'S'; | ||
86 | down_read(&pcmcia_socket_list_rwsem); | ||
87 | list_for_each(tmp, &pcmcia_socket_list) | ||
88 | socket_count++; | ||
89 | up_read(&pcmcia_socket_list_rwsem); | ||
90 | info->Count = socket_count; | ||
91 | info->Revision = CS_RELEASE_CODE; | ||
92 | info->CSLevel = 0x0210; | ||
93 | info->VendorString = (char *)release; | ||
94 | return CS_SUCCESS; | ||
95 | } /* get_card_services_info */ | ||
96 | |||
97 | 74 | ||
98 | /* backwards-compatible accessing of driver --- by name! */ | 75 | /* backwards-compatible accessing of driver --- by name! */ |
99 | 76 | ||
@@ -591,9 +568,6 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
591 | case DS_ADJUST_RESOURCE_INFO: | 568 | case DS_ADJUST_RESOURCE_INFO: |
592 | ret = pcmcia_adjust_resource_info(&buf->adjust); | 569 | ret = pcmcia_adjust_resource_info(&buf->adjust); |
593 | break; | 570 | break; |
594 | case DS_GET_CARD_SERVICES_INFO: | ||
595 | ret = pcmcia_get_card_services_info(&buf->servinfo); | ||
596 | break; | ||
597 | case DS_GET_CONFIGURATION_INFO: | 571 | case DS_GET_CONFIGURATION_INFO: |
598 | if (buf->config.Function && | 572 | if (buf->config.Function && |
599 | (buf->config.Function >= s->functions)) | 573 | (buf->config.Function >= s->functions)) |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index c8755adfd917..506bbb446e5e 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -2155,10 +2155,6 @@ static int __init nsp_cs_init(void) | |||
2155 | 2155 | ||
2156 | nsp_msg(KERN_INFO, "loading..."); | 2156 | nsp_msg(KERN_INFO, "loading..."); |
2157 | pcmcia_get_card_services_info(&serv); | 2157 | pcmcia_get_card_services_info(&serv); |
2158 | if (serv.Revision != CS_RELEASE_CODE) { | ||
2159 | nsp_msg(KERN_DEBUG, "Card Services release does not match!"); | ||
2160 | return -EINVAL; | ||
2161 | } | ||
2162 | register_pcmcia_driver(&dev_info, &nsp_cs_attach, &nsp_cs_detach); | 2158 | register_pcmcia_driver(&dev_info, &nsp_cs_attach, &nsp_cs_detach); |
2163 | 2159 | ||
2164 | nsp_dbg(NSP_DEBUG_INIT, "out"); | 2160 | nsp_dbg(NSP_DEBUG_INIT, "out"); |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index db73b40429bd..2cab39f49eb2 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -68,14 +68,6 @@ typedef struct adjust_t { | |||
68 | #define RES_ALLOCATED 0x20 | 68 | #define RES_ALLOCATED 0x20 |
69 | #define RES_REMOVED 0x40 | 69 | #define RES_REMOVED 0x40 |
70 | 70 | ||
71 | typedef struct servinfo_t { | ||
72 | char Signature[2]; | ||
73 | u_int Count; | ||
74 | u_int Revision; | ||
75 | u_int CSLevel; | ||
76 | char *VendorString; | ||
77 | } servinfo_t; | ||
78 | |||
79 | typedef struct event_callback_args_t { | 71 | typedef struct event_callback_args_t { |
80 | struct pcmcia_device *client_handle; | 72 | struct pcmcia_device *client_handle; |
81 | void *client_data; | 73 | void *client_data; |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index e0a5acb7fcb7..0190e766e1a7 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -49,7 +49,6 @@ typedef struct mtd_info_t { | |||
49 | } mtd_info_t; | 49 | } mtd_info_t; |
50 | 50 | ||
51 | typedef union ds_ioctl_arg_t { | 51 | typedef union ds_ioctl_arg_t { |
52 | servinfo_t servinfo; | ||
53 | adjust_t adjust; | 52 | adjust_t adjust; |
54 | config_info_t config; | 53 | config_info_t config; |
55 | tuple_t tuple; | 54 | tuple_t tuple; |
@@ -65,7 +64,6 @@ typedef union ds_ioctl_arg_t { | |||
65 | cisdump_t cisdump; | 64 | cisdump_t cisdump; |
66 | } ds_ioctl_arg_t; | 65 | } ds_ioctl_arg_t; |
67 | 66 | ||
68 | #define DS_GET_CARD_SERVICES_INFO _IOR ('d', 1, servinfo_t) | ||
69 | #define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) | 67 | #define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) |
70 | #define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) | 68 | #define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) |
71 | #define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) | 69 | #define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) |
diff --git a/include/pcmcia/version.h b/include/pcmcia/version.h index eb88263fc8d5..5ad9c5e198b6 100644 --- a/include/pcmcia/version.h +++ b/include/pcmcia/version.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* version.h 1.94 2000/10/03 17:55:48 (David Hinds) */ | 1 | /* version.h 1.94 2000/10/03 17:55:48 (David Hinds) */ |
2 | 2 | ||
3 | #define CS_RELEASE "3.1.22" | 3 | /* This file will be removed, please don't include it */ |
4 | #define CS_RELEASE_CODE 0x3116 | ||