[PATCH] Removal of unused version information
Pavel Roskin
proski at gnu.org
Thu Jun 30 18:36:06 EDT 2005
Hi, Dominik!
On Thu, 2005-06-30 at 23:59 +0200, Dominik Brodowski wrote:
> Hi,
>
> Good patch, I mostly agree with it, but...
>
> > @@ -81,16 +79,11 @@ static int pcmcia_get_card_services_info
>
> as the function seems unused in-kernel and in userspace utilites, please
> remove it completely.
Indeed. Also, DS_GET_CARD_SERVICES_INFO needs to be removed because it
provides userspace access to servinfo_t. And now serviunfo_t can be
removed as well.
As for drivers/scsi/pcmcia/nsp_cs.c, it turns out I was fixing
compatibility code for 2.4 kernels. This driver doesn't need any
changes (apart from the fact that compatibility code is not welcome in
the kernel, but it's not our business).
The new patch follows.
Signed-off-by: Pavel Roskin <proski at gnu.org>
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -71,29 +71,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! */
@@ -591,9 +568,6 @@ static int ds_ioctl(struct inode * inode
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))
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -2159,10 +2159,6 @@ static int __init nsp_cs_init(void)
nsp_msg(KERN_INFO, "loading...");
pcmcia_get_card_services_info(&serv);
- if (serv.Revision != CS_RELEASE_CODE) {
- nsp_msg(KERN_DEBUG, "Card Services release does not match!");
- return -EINVAL;
- }
register_pcmcia_driver(&dev_info, &nsp_cs_attach, &nsp_cs_detach);
nsp_dbg(NSP_DEBUG_INIT, "out");
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -68,14 +68,6 @@ typedef struct adjust_t {
#define RES_ALLOCATED 0x20
#define RES_REMOVED 0x40
-typedef struct servinfo_t {
- char Signature[2];
- u_int Count;
- u_int Revision;
- u_int CSLevel;
- char *VendorString;
-} servinfo_t;
-
typedef struct event_callback_args_t {
client_handle_t client_handle;
void *info;
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -49,7 +49,6 @@ typedef struct mtd_info_t {
} mtd_info_t;
typedef union ds_ioctl_arg_t {
- servinfo_t servinfo;
adjust_t adjust;
config_info_t config;
tuple_t tuple;
@@ -65,7 +64,6 @@ typedef union ds_ioctl_arg_t {
cisdump_t cisdump;
} ds_ioctl_arg_t;
-#define DS_GET_CARD_SERVICES_INFO _IOR ('d', 1, servinfo_t)
#define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t)
#define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t)
#define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t)
diff --git a/include/pcmcia/version.h b/include/pcmcia/version.h
--- a/include/pcmcia/version.h
+++ b/include/pcmcia/version.h
@@ -1,4 +1,3 @@
/* version.h 1.94 2000/10/03 17:55:48 (David Hinds) */
-#define CS_RELEASE "3.1.22"
-#define CS_RELEASE_CODE 0x3116
+/* This file will be removed, please don't include it */
--
Regards,
Pavel Roskin
More information about the linux-pcmcia
mailing list