pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}
authorDominik Brodowski <linux@dominikbrodowski.net>
Sat, 24 Oct 2009 13:57:22 +0000 (15:57 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Mon, 9 Nov 2009 07:30:06 +0000 (08:30 +0100)
As all in-tree drivers have been converted to not use cs_error() any more,
drop these functions and definitions, and update the Documentation.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Documentation/pcmcia/driver-changes.txt
drivers/pcmcia/ds.c
include/pcmcia/ds.h

index adfb83e586752f87717a1cf31bcc8eec8fd27de8..446f43b309dfea887937c8059634cc1b8f7642d8 100644 (file)
@@ -1,5 +1,10 @@
 This file details changes in 2.6 which affect PCMCIA card driver authors:
 
+* no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
+   Instead of the cs_error() callback or the CS_CHECK() macro, please use
+   Linux-style checking of return values, and -- if necessary -- debug
+   messages using "dev_dbg()" or "pr_debug()".
+
 * New CIS tuple access (as of 2.6.33)
    Instead of pcmcia_get_{first,next}_tuple(), pcmcia_get_tuple_data() and
    pcmcia_parse_tuple(), a driver shall use "pcmcia_get_tuple()" if it is
index 5b069aeaf17a34449f8ad071c6ebeed0c4acc080..05893d41dd418d19dde7847da6f33c7926b2b966 100644 (file)
@@ -46,107 +46,6 @@ spinlock_t pcmcia_dev_list_lock;
 
 /*====================================================================*/
 
-/* code which was in cs.c before */
-
-/* String tables for error messages */
-
-typedef struct lookup_t {
-    const int key;
-    const char *msg;
-} lookup_t;
-
-static const lookup_t error_table[] = {
-    { 0,                       "Operation succeeded" },
-    { -EIO,                    "Input/Output error" },
-    { -ENODEV,                 "No card present" },
-    { -EINVAL,                 "Bad parameter" },
-    { -EACCES,                 "Configuration locked" },
-    { -EBUSY,                  "Resource in use" },
-    { -ENOSPC,                 "No more items" },
-    { -ENOMEM,                 "Out of resource" },
-};
-
-
-static const lookup_t service_table[] = {
-    { AccessConfigurationRegister,     "AccessConfigurationRegister" },
-    { AddSocketServices,               "AddSocketServices" },
-    { AdjustResourceInfo,              "AdjustResourceInfo" },
-    { CheckEraseQueue,                 "CheckEraseQueue" },
-    { CloseMemory,                     "CloseMemory" },
-    { DeregisterClient,                        "DeregisterClient" },
-    { DeregisterEraseQueue,            "DeregisterEraseQueue" },
-    { GetCardServicesInfo,             "GetCardServicesInfo" },
-    { GetClientInfo,                   "GetClientInfo" },
-    { GetConfigurationInfo,            "GetConfigurationInfo" },
-    { GetEventMask,                    "GetEventMask" },
-    { GetFirstClient,                  "GetFirstClient" },
-    { GetFirstRegion,                  "GetFirstRegion" },
-    { GetFirstTuple,                   "GetFirstTuple" },
-    { GetNextClient,                   "GetNextClient" },
-    { GetNextRegion,                   "GetNextRegion" },
-    { GetNextTuple,                    "GetNextTuple" },
-    { GetStatus,                       "GetStatus" },
-    { GetTupleData,                    "GetTupleData" },
-    { MapMemPage,                      "MapMemPage" },
-    { ModifyConfiguration,             "ModifyConfiguration" },
-    { ModifyWindow,                    "ModifyWindow" },
-    { OpenMemory,                      "OpenMemory" },
-    { ParseTuple,                      "ParseTuple" },
-    { ReadMemory,                      "ReadMemory" },
-    { RegisterClient,                  "RegisterClient" },
-    { RegisterEraseQueue,              "RegisterEraseQueue" },
-    { RegisterMTD,                     "RegisterMTD" },
-    { ReleaseConfiguration,            "ReleaseConfiguration" },
-    { ReleaseIO,                       "ReleaseIO" },
-    { ReleaseIRQ,                      "ReleaseIRQ" },
-    { ReleaseWindow,                   "ReleaseWindow" },
-    { RequestConfiguration,            "RequestConfiguration" },
-    { RequestIO,                       "RequestIO" },
-    { RequestIRQ,                      "RequestIRQ" },
-    { RequestSocketMask,               "RequestSocketMask" },
-    { RequestWindow,                   "RequestWindow" },
-    { ResetCard,                       "ResetCard" },
-    { SetEventMask,                    "SetEventMask" },
-    { ValidateCIS,                     "ValidateCIS" },
-    { WriteMemory,                     "WriteMemory" },
-    { BindDevice,                      "BindDevice" },
-    { BindMTD,                         "BindMTD" },
-    { ReportError,                     "ReportError" },
-    { SuspendCard,                     "SuspendCard" },
-    { ResumeCard,                      "ResumeCard" },
-    { EjectCard,                       "EjectCard" },
-    { InsertCard,                      "InsertCard" },
-    { ReplaceCIS,                      "ReplaceCIS" }
-};
-
-const char *pcmcia_error_func(int func)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(service_table); i++)
-               if (service_table[i].key == func)
-                       return service_table[i].msg;
-
-       return "Unknown service number";
-}
-EXPORT_SYMBOL(pcmcia_error_func);
-
-const char *pcmcia_error_ret(int ret)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(error_table); i++)
-               if (error_table[i].key == ret)
-                       return error_table[i].msg;
-
-       return "unknown";
-}
-EXPORT_SYMBOL(pcmcia_error_ret);
-
-/*======================================================================*/
-
-
-
 static void pcmcia_check_driver(struct pcmcia_driver *p_drv)
 {
        struct pcmcia_device_id *did = p_drv->id_table;
index 6c37d4ed7832c41efd0520c58540fed5965b6007..d82392de4e920434f9d7cc81bf846e515554497b 100644 (file)
@@ -142,42 +142,6 @@ struct pcmcia_device {
 #define handle_to_dev(handle) (handle->dev)
 
 
-/* (deprecated) error reporting by PCMCIA devices. Use dev_printk()
- * or dev_dbg() directly in the driver, without referring to pcmcia_error_func()
- * and/or pcmcia_error_ret() for those functions will go away soon.
- */
-enum service {
-    AccessConfigurationRegister, AddSocketServices,
-    AdjustResourceInfo, CheckEraseQueue, CloseMemory, CopyMemory,
-    DeregisterClient, DeregisterEraseQueue, GetCardServicesInfo,
-    GetClientInfo, GetConfigurationInfo, GetEventMask,
-    GetFirstClient, GetFirstPartion, GetFirstRegion, GetFirstTuple,
-    GetNextClient, GetNextPartition, GetNextRegion, GetNextTuple,
-    GetStatus, GetTupleData, MapLogSocket, MapLogWindow, MapMemPage,
-    MapPhySocket, MapPhyWindow, ModifyConfiguration, ModifyWindow,
-    OpenMemory, ParseTuple, ReadMemory, RegisterClient,
-    RegisterEraseQueue, RegisterMTD, RegisterTimer,
-    ReleaseConfiguration, ReleaseExclusive, ReleaseIO, ReleaseIRQ,
-    ReleaseSocketMask, ReleaseWindow, ReplaceSocketServices,
-    RequestConfiguration, RequestExclusive, RequestIO, RequestIRQ,
-    RequestSocketMask, RequestWindow, ResetCard, ReturnSSEntry,
-    SetEventMask, SetRegion, ValidateCIS, VendorSpecific,
-    WriteMemory, BindDevice, BindMTD, ReportError,
-    SuspendCard, ResumeCard, EjectCard, InsertCard, ReplaceCIS,
-    GetFirstWindow, GetNextWindow, GetMemPage
-};
-const char *pcmcia_error_func(int func);
-const char *pcmcia_error_ret(int ret);
-
-#define cs_error(p_dev, func, ret)                     \
-       {                                               \
-               dev_printk(KERN_NOTICE, &p_dev->dev,    \
-                          "%s : %s\n",                 \
-                          pcmcia_error_func(func),     \
-                          pcmcia_error_ret(ret));      \
-       }
-
-
 /*
  * CIS access.
  *