pcmcia: Remove bulkmem.h and ioctl warning messages

The code in include/pcmcia/bulkmem.h is unused except for the warning
code used by DS_GET_FIRST_REGION, DS_GET_NEXT_REGION and DS_BIND_MTD.

This warning has been in place since 2.6.11 so people should be aware
about other preferred interfaces by now.

Signed-off-by: Magnus Damm <[EMAIL PROTECTED]>
---

 Applies to 2.6.19-git19

 drivers/mtd/ftl.c                |    4 ---
 drivers/pcmcia/au1000_generic.h  |    1
 drivers/pcmcia/au1000_pb1x00.c   |    1
 drivers/pcmcia/au1000_xxs1500.c  |    1
 drivers/pcmcia/cardbus.c         |    1
 drivers/pcmcia/cistpl.c          |    1
 drivers/pcmcia/cs.c              |    1
 drivers/pcmcia/cs_internal.h     |   12 -----------
 drivers/pcmcia/hd64465_ss.c      |    1
 drivers/pcmcia/pcmcia_ioctl.c    |   17 ---------------
 drivers/pcmcia/pcmcia_resource.c |    1
 drivers/pcmcia/pxa2xx_base.c     |    1
 drivers/pcmcia/rsrc_nonstatic.c  |    1
 drivers/pcmcia/soc_common.h      |    1
 drivers/pcmcia/socket_sysfs.c    |    1
 include/pcmcia/bulkmem.h         |   41 --------------------------------------
 include/pcmcia/cs_types.h        |    3 --
 include/pcmcia/ds.h              |    8 ++-----
 include/pcmcia/ss.h              |    1
 19 files changed, 3 insertions(+), 95 deletions(-)

--- 0001/drivers/mtd/ftl.c
+++ work/drivers/mtd/ftl.c      2006-12-13 12:49:05.000000000 +0900
@@ -131,10 +131,6 @@ typedef struct partition_t {
     u_int16_t          DataUnits;
     u_int32_t          BlocksPerUnit;
     erase_unit_header_t        header;
-#if 0
-    region_info_t      region;
-    memory_handle_t    handle;
-#endif
 } partition_t;
 
 void ftl_freepart(partition_t *part);
--- 0001/drivers/pcmcia/au1000_generic.h
+++ work/drivers/pcmcia/au1000_generic.h        2006-12-13 12:49:05.000000000 
+0900
@@ -26,7 +26,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
--- 0001/drivers/pcmcia/au1000_pb1x00.c
+++ work/drivers/pcmcia/au1000_pb1x00.c 2006-12-13 12:49:05.000000000 +0900
@@ -35,7 +35,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/bus_ops.h>
 #include "cs_internal.h"
--- 0001/drivers/pcmcia/au1000_xxs1500.c
+++ work/drivers/pcmcia/au1000_xxs1500.c        2006-12-13 12:49:05.000000000 
+0900
@@ -39,7 +39,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/bus_ops.h>
 #include "cs_internal.h"
--- 0001/drivers/pcmcia/cardbus.c
+++ work/drivers/pcmcia/cardbus.c       2006-12-13 12:49:05.000000000 +0900
@@ -34,7 +34,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
--- 0001/drivers/pcmcia/cistpl.c
+++ work/drivers/pcmcia/cistpl.c        2006-12-13 12:49:05.000000000 +0900
@@ -30,7 +30,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
--- 0002/drivers/pcmcia/cs.c
+++ work/drivers/pcmcia/cs.c    2006-12-13 12:49:05.000000000 +0900
@@ -37,7 +37,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
--- 0002/drivers/pcmcia/cs_internal.h
+++ work/drivers/pcmcia/cs_internal.h   2006-12-13 12:49:05.000000000 +0900
@@ -26,18 +26,6 @@
 #define CLIENT_WIN_REQ(i)      (0x1<<(i))
 #define CLIENT_CARDBUS         0x8000
 
-#define REGION_MAGIC   0xE3C9
-typedef struct region_t {
-    u_short            region_magic;
-    u_short            state;
-    dev_info_t         dev_info;
-    struct pcmcia_device       *mtd;
-    u_int              MediaID;
-    region_info_t      info;
-} region_t;
-
-#define REGION_STALE   0x01
-
 /* Each card function gets one of these guys */
 typedef struct config_t {
        struct kref     ref;
--- 0001/drivers/pcmcia/hd64465_ss.c
+++ work/drivers/pcmcia/hd64465_ss.c    2006-12-13 12:49:05.000000000 +0900
@@ -48,7 +48,6 @@
 #include <pcmcia/cistpl.h>
 #include <pcmcia/ds.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/bulkmem.h>
 #include "cs_internal.h"
 
 #define MODNAME "hd64465_ss"
--- 0002/drivers/pcmcia/pcmcia_ioctl.c
+++ work/drivers/pcmcia/pcmcia_ioctl.c  2006-12-13 12:49:05.000000000 +0900
@@ -681,23 +681,6 @@ static int ds_ioctl(struct inode * inode
                }
        }
        break;
-    case DS_GET_FIRST_REGION:
-    case DS_GET_NEXT_REGION:
-    case DS_BIND_MTD:
-       if (!capable(CAP_SYS_ADMIN)) {
-               err = -EPERM;
-               goto free_out;
-       } else {
-               static int printed = 0;
-               if (!printed) {
-                       printk(KERN_WARNING "2.6. kernels use pcmciamtd instead 
of memory_cs.c and do not require special\n");
-                       printk(KERN_WARNING "MTD handling any more.\n");
-                       printed++;
-               }
-       }
-       err = -EINVAL;
-       goto free_out;
-       break;
     case DS_GET_FIRST_WINDOW:
        ret = pcmcia_get_window(s, &buf->win_info.handle, 0,
                        &buf->win_info.window);
--- 0001/drivers/pcmcia/pcmcia_resource.c
+++ work/drivers/pcmcia/pcmcia_resource.c       2006-12-13 12:49:05.000000000 
+0900
@@ -25,7 +25,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
--- 0001/drivers/pcmcia/pxa2xx_base.c
+++ work/drivers/pcmcia/pxa2xx_base.c   2006-12-13 12:49:05.000000000 +0900
@@ -32,7 +32,6 @@
 
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 
 #include "cs_internal.h"
--- 0001/drivers/pcmcia/rsrc_nonstatic.c
+++ work/drivers/pcmcia/rsrc_nonstatic.c        2006-12-13 12:49:05.000000000 
+0900
@@ -31,7 +31,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
--- 0001/drivers/pcmcia/soc_common.h
+++ work/drivers/pcmcia/soc_common.h    2006-12-13 12:49:05.000000000 +0900
@@ -14,7 +14,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/ss.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include "cs_internal.h"
 
--- 0002/drivers/pcmcia/socket_sysfs.c
+++ work/drivers/pcmcia/socket_sysfs.c  2006-12-13 12:49:05.000000000 +0900
@@ -32,7 +32,6 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
--- 0001/include/pcmcia/bulkmem.h
+++ /dev/null   2000-10-22 01:01:00.000000000 +0900
@@ -1,41 +0,0 @@
-/*
- * bulkmem.h -- Definitions for bulk memory services
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * The initial developer of the original code is David A. Hinds
- * <[EMAIL PROTECTED]>.  Portions created by David A. Hinds
- * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
- *
- * (C) 1999            David A. Hinds
- */
-
-#ifndef _LINUX_BULKMEM_H
-#define _LINUX_BULKMEM_H
-
-/* For GetFirstRegion and GetNextRegion */
-typedef struct region_info_t {
-    u_int              Attributes;
-    u_int              CardOffset;
-    u_int              RegionSize;
-    u_int              AccessSpeed;
-    u_int              BlockSize;
-    u_int              PartMultiple;
-    u_char             JedecMfr, JedecInfo;
-    memory_handle_t    next;
-} region_info_t;
-
-#define REGION_TYPE            0x0001
-#define REGION_TYPE_CM         0x0000
-#define REGION_TYPE_AM         0x0001
-#define REGION_PREFETCH                0x0008
-#define REGION_CACHEABLE       0x0010
-#define REGION_BAR_MASK                0xe000
-#define REGION_BAR_SHIFT       13
-
-int pcmcia_get_first_region(struct pcmcia_device *handle, region_info_t *rgn);
-int pcmcia_get_next_region(struct pcmcia_device *handle, region_info_t *rgn);
-
-#endif /* _LINUX_BULKMEM_H */
--- 0003/include/pcmcia/cs_types.h
+++ work/include/pcmcia/cs_types.h      2006-12-13 12:49:05.000000000 +0900
@@ -37,9 +37,6 @@ typedef u_short       page_t;
 struct window_t;
 typedef struct window_t *window_handle_t;
 
-struct region_t;
-typedef struct region_t *memory_handle_t;
-
 #ifndef DEV_NAME_LEN
 #define DEV_NAME_LEN 32
 #endif
--- 0001/include/pcmcia/ds.h
+++ work/include/pcmcia/ds.h    2006-12-13 12:49:05.000000000 +0900
@@ -20,7 +20,6 @@
 #include <linux/mod_devicetable.h>
 #endif
 
-#include <pcmcia/bulkmem.h>
 #include <pcmcia/cs_types.h>
 #include <pcmcia/device_id.h>
 
@@ -60,7 +59,6 @@ typedef union ds_ioctl_arg_t {
     cs_status_t                status;
     conf_reg_t         conf_reg;
     cisinfo_t          cisinfo;
-    region_info_t      region;
     bind_info_t                bind_info;
     mtd_info_t         mtd_info;
     win_info_t         win_info;
@@ -81,8 +79,8 @@ typedef union ds_ioctl_arg_t {
 #define DS_RESUME_CARD                 _IO  ('d', 13)
 #define DS_EJECT_CARD                  _IO  ('d', 14)
 #define DS_INSERT_CARD                 _IO  ('d', 15)
-#define DS_GET_FIRST_REGION            _IOWR('d', 16, region_info_t)
-#define DS_GET_NEXT_REGION             _IOWR('d', 17, region_info_t)
+/*      DS_GET_FIRST_REGION            _IOWR('d', 16) - removed */
+/*      DS_GET_NEXT_REGION             _IOWR('d', 17) - removed */
 #define DS_REPLACE_CIS                 _IOWR('d', 18, cisdump_t)
 #define DS_GET_FIRST_WINDOW            _IOR ('d', 19, win_info_t)
 #define DS_GET_NEXT_WINDOW             _IOWR('d', 20, win_info_t)
@@ -92,7 +90,7 @@ typedef union ds_ioctl_arg_t {
 #define DS_GET_DEVICE_INFO             _IOWR('d', 61, bind_info_t) 
 #define DS_GET_NEXT_DEVICE             _IOWR('d', 62, bind_info_t) 
 #define DS_UNBIND_REQUEST              _IOW ('d', 63, bind_info_t)
-#define DS_BIND_MTD                    _IOWR('d', 64, mtd_info_t)
+/*      DS_BIND_MTD                    _IOWR('d', 64) - removed */
 
 #ifdef __KERNEL__
 #include <linux/device.h>
--- 0002/include/pcmcia/ss.h
+++ work/include/pcmcia/ss.h    2006-12-13 12:49:05.000000000 +0900
@@ -21,7 +21,6 @@
 
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
-#include <pcmcia/bulkmem.h>
 #ifdef CONFIG_CARDBUS
 #include <linux/pci.h>
 #endif

_______________________________________________
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia

Reply via email to