mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}
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>
This commit is contained in:
parent
9b44de2015
commit
9cb495bb41
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user