[PATCHES] pcmcia: let's continue the cleanup...
Dominik Brodowski
linux at brodo.de
Wed Jun 11 23:40:45 BST 2003
Here are five additional, trivial patches:
remove_socket_info_t: Replace all usages of socket_info_t with the
(identical but preferred) struct pcmcia_socket.
remove_unused_pci_socket_h: pci_socket.h isn't needed as pci_socket.h
got merged into yenta.h. Forgot to remove that file in previous patch.
i82365_depends_on_ISA: The i82365 socket driver can't possibly find any
device unless CONFIG_ISA is set. Move this dependency to Kconfig.
rename_i82365_socket_info_t: socket_info_t was used too widely within the
old pcmcia-cs-package: at least five different variants of socket_info_t can
be found. This renames the one in i82365.c to struct i82365_socket which is
soooo much nicer.
rename_tcic_socket_info_t: socket_info_t was used too widely within the
old pcmcia-cs-package: at least five different variants of socket_info_t can
be found. This renames the one in tcic.c to struct tcic_socket which is
soooo much nicer.
Dominik
-------------- next part --------------
The i82365 doesn't work unless CONFIG_ISA is set -- see this from
i82365_init:
...
sockets = 0;
#ifdef CONFIG_ISA
isa_probe();
#endif
if (sockets == 0) {
printk("not found.\n");
driver_unregister(&i82365_driver);
return -ENODEV;
}
...
So, remove all instances of CONFIG_ISA from i82365.c and add a
dependency to the Kconfig file.
Kconfig | 2 -
i82365.c | 68 ++-------------------------------------------------------------
2 files changed, 4 insertions(+), 66 deletions(-)
diff -ruN linux-original/drivers/pcmcia/Kconfig linux/drivers/pcmcia/Kconfig
--- linux-original/drivers/pcmcia/Kconfig 2003-06-11 19:26:12.000000000 +0200
+++ linux/drivers/pcmcia/Kconfig 2003-06-11 22:17:38.000000000 +0200
@@ -63,7 +63,7 @@
config I82365
tristate "i82365 compatible bridge support"
- depends on PCMCIA
+ depends on PCMCIA && ISA
help
Say Y here to include support for ISA-bus PCMCIA host bridges that
are register compatible with the Intel i82365. These are found on
diff -ruN linux-original/drivers/pcmcia/i82365.c linux/drivers/pcmcia/i82365.c
--- linux-original/drivers/pcmcia/i82365.c 2003-06-11 18:30:33.000000000 +0200
+++ linux/drivers/pcmcia/i82365.c 2003-06-11 22:22:04.000000000 +0200
@@ -91,7 +91,6 @@
/* Parameters that can be set with 'insmod' */
-#ifdef CONFIG_ISA
/* Default base address for i82365sl and other ISA chips */
static int i365_base = 0x3e0;
/* Should we probe at 0x3e2 for an extra ISA controller? */
@@ -103,7 +102,6 @@
static int irq_list[16] = { -1 };
/* The card status change interrupt -- 0 means autoselect */
static int cs_irq = 0;
-#endif
/* Probe for safe interrupts? */
static int do_scan = 1;
@@ -122,14 +120,11 @@
static int cmd_time = -1;
static int recov_time = -1;
-#ifdef CONFIG_ISA
/* Vadem options */
static int async_clock = -1;
static int cable_mode = -1;
static int wakeup = 0;
-#endif
-#ifdef CONFIG_ISA
MODULE_PARM(i365_base, "i");
MODULE_PARM(ignore, "i");
MODULE_PARM(extra_sockets, "i");
@@ -139,7 +134,6 @@
MODULE_PARM(async_clock, "i");
MODULE_PARM(cable_mode, "i");
MODULE_PARM(wakeup, "i");
-#endif
MODULE_PARM(do_scan, "i");
MODULE_PARM(poll_interval, "i");
@@ -192,15 +186,10 @@
/* Default ISA interrupt mask */
#define I365_MASK 0xdeb8 /* irq 15,14,12,11,10,9,7,5,4,3 */
-#ifdef CONFIG_ISA
static int grab_irq;
static spinlock_t isa_lock = SPIN_LOCK_UNLOCKED;
#define ISA_LOCK(n, f) spin_lock_irqsave(&isa_lock, f)
#define ISA_UNLOCK(n, f) spin_unlock_irqrestore(&isa_lock, f)
-#else
-#define ISA_LOCK(n, f) do { } while (0)
-#define ISA_UNLOCK(n, f) do { } while (0)
-#endif
static struct timer_list poll_timer;
@@ -211,13 +200,11 @@
PCI_COMMAND_MASTER|PCI_COMMAND_WAIT)
/* These definitions must match the pcic table! */
-#ifdef CONFIG_ISA
typedef enum pcic_id {
IS_I82365A, IS_I82365B, IS_I82365DF,
IS_IBM, IS_RF5Cx96, IS_VLSI, IS_VG468, IS_VG469,
IS_PD6710, IS_PD672X, IS_VT83C469,
} pcic_id;
-#endif
/* Flags for classifying groups of controllers */
#define IS_VADEM 0x0001
@@ -239,7 +226,6 @@
} pcic_t;
static pcic_t pcic[] = {
-#ifdef CONFIG_ISA
{ "Intel i82365sl A step", 0 },
{ "Intel i82365sl B step", 0 },
{ "Intel i82365sl DF", IS_DF_PWR },
@@ -251,7 +237,6 @@
{ "Cirrus PD6710", IS_CIRRUS },
{ "Cirrus PD672x", IS_CIRRUS },
{ "VIA VT83C469", IS_CIRRUS|IS_VIA },
-#endif
};
#define PCIC_COUNT (sizeof(pcic)/sizeof(pcic_t))
@@ -423,8 +408,6 @@
======================================================================*/
-#ifdef CONFIG_ISA
-
static void vg46x_get_state(u_short s)
{
vg46x_state_t *p = &socket[s].state.vg46x;
@@ -466,9 +449,6 @@
return 0xffff;
}
-#endif
-
-
/*======================================================================
Generic routines to get and set controller options
@@ -480,10 +460,8 @@
socket_info_t *t = &socket[s];
if (t->flags & IS_CIRRUS)
cirrus_get_state(s);
-#ifdef CONFIG_ISA
else if (t->flags & IS_VADEM)
vg46x_get_state(s);
-#endif
}
static void set_bridge_state(u_short s)
@@ -496,10 +474,8 @@
i365_set(s, I365_GENCTL, 0x00);
}
i365_bflip(s, I365_INTCTL, I365_INTR_ENA, t->intr);
-#ifdef CONFIG_ISA
if (t->flags & IS_VADEM)
vg46x_set_state(s);
-#endif
}
static u_int __init set_bridge_opts(u_short s, u_short ns)
@@ -517,10 +493,8 @@
get_bridge_state(i);
if (socket[i].flags & IS_CIRRUS)
m = cirrus_set_opts(i, buf);
-#ifdef CONFIG_ISA
else if (socket[i].flags & IS_VADEM)
m = vg46x_set_opts(i, buf);
-#endif
set_bridge_state(i);
printk(KERN_INFO " host opts [%d]:%s\n", i,
(*buf) ? buf : " none");
@@ -573,7 +547,6 @@
return (irq_hits != 1);
}
-#ifdef CONFIG_ISA
static u_int __init isa_scan(u_short sock, u_int mask0)
{
@@ -619,7 +592,6 @@
return mask1;
}
-#endif /* CONFIG_ISA */
/*====================================================================*/
@@ -632,7 +604,6 @@
/*====================================================================*/
-#ifdef CONFIG_ISA
static int __init identify(u_short port, u_short sock)
{
@@ -693,8 +664,6 @@
return type;
} /* identify */
-#endif
-
/*======================================================================
See if a card is present, powered up, in IO mode, and already
@@ -750,23 +719,17 @@
t->ioaddr, t->psock*0x40);
printk(", %d socket%s\n", ns, ((ns > 1) ? "s" : ""));
-#ifdef CONFIG_ISA
/* Set host options, build basic interrupt mask */
if (irq_list[0] == -1)
mask = irq_mask;
else
for (i = mask = 0; i < 16; i++)
mask |= (1<<irq_list[i]);
-#endif
mask &= I365_MASK & set_bridge_opts(base, ns);
-#ifdef CONFIG_ISA
/* Scan for ISA interrupts */
mask = isa_scan(base, mask);
-#else
printk(KERN_INFO " PCI card interrupts,");
-#endif
-#ifdef CONFIG_ISA
/* Poll if only two interrupts available */
if (!use_pci && !poll_interval) {
u_int tmp = (mask & 0xff20);
@@ -788,7 +751,6 @@
printk(" status change on irq %d\n", cs_irq);
}
}
-#endif
if (!use_pci && !isa_irq) {
if (poll_interval == 0)
@@ -811,7 +773,6 @@
/*====================================================================*/
-#ifdef CONFIG_ISA
#ifdef CONFIG_PNP
static struct isapnp_device_id id_table[] __initdata = {
@@ -904,7 +865,6 @@
}
}
-#endif
/*====================================================================*/
@@ -942,9 +902,7 @@
{
int i, j, csc;
u_int events, active;
-#ifdef CONFIG_ISA
u_long flags = 0;
-#endif
int handled = 0;
DEBUG(4, "i82365: pcic_interrupt(%d)\n", irq);
@@ -1052,7 +1010,6 @@
*value |= (status & I365_CS_READY) ? SS_READY : 0;
*value |= (status & I365_CS_POWERON) ? SS_POWERON : 0;
-#ifdef CONFIG_ISA
if (socket[sock].type == IS_VG469) {
status = i365_get(sock, VG469_VSENSE);
if (socket[sock].psock & 1) {
@@ -1063,7 +1020,6 @@
*value |= (status & VG469_VSENSE_A_VS2) ? 0 : SS_XVCARD;
}
}
-#endif
DEBUG(1, "i82365: GetStatus(%d) = %#4.4x\n", sock, *value);
return 0;
@@ -1355,9 +1311,7 @@
char *p = buf;
int i, top;
-#ifdef CONFIG_ISA
u_long flags = 0;
-#endif
ISA_LOCK(sock, flags);
top = 0x40;
for (i = 0; i < top; i += 4) {
@@ -1402,15 +1356,8 @@
/*====================================================================*/
-/*
- * The locking is rather broken. Why do we only lock for ISA, not for
- * all other cases? If there are reasons to lock, we should lock. Not
- * this silly conditional.
- *
- * Plan: make it bug-for-bug compatible with the old stuff, and clean
- * it up when the infrastructure is done.
- */
-#ifdef CONFIG_ISA
+/* this is horribly ugly... proper locking needs to be done here at
+ * some time... */
#define LOCKED(x) do { \
int retval; \
unsigned long flags; \
@@ -1419,9 +1366,6 @@
spin_unlock_irqrestore(&isa_lock, flags); \
return retval; \
} while (0)
-#else
-#define LOCKED(x) return x
-#endif
static int pcic_get_status(struct pcmcia_socket *s, u_int *value)
@@ -1547,9 +1491,7 @@
printk(KERN_INFO "Intel PCIC probe: ");
sockets = 0;
-#ifdef CONFIG_ISA
isa_probe();
-#endif
if (sockets == 0) {
printk("not found.\n");
@@ -1560,10 +1502,8 @@
platform_device_register(&i82365_device);
/* Set up interrupt handler(s) */
-#ifdef CONFIG_ISA
if (grab_irq != 0)
request_irq(cs_irq, pcic_interrupt, 0, "i82365", pcic_interrupt);
-#endif
/* register sockets with the pcmcia core */
for (i = 0; i < sockets; i++) {
@@ -1603,16 +1543,14 @@
platform_device_unregister(&i82365_device);
if (poll_interval != 0)
del_timer_sync(&poll_timer);
-#ifdef CONFIG_ISA
if (grab_irq != 0)
free_irq(cs_irq, pcic_interrupt);
-#endif
for (i = 0; i < sockets; i++) {
/* Turn off all interrupt sources! */
i365_set(i, I365_CSCINT, 0);
release_region(socket[i].ioaddr, 2);
}
-#if defined(CONFIG_ISA) && defined(__ISAPNP__)
+#ifdef __ISAPNP__
if (i82365_pnpdev)
pnp_disable_dev(i82365_pnpdev);
#endif
-------------- next part --------------
Get rid of the
typedef struct pcmcia_socket socket_info_t;
by replacing all remaining usages of cs_internal's socket_info_t with
struct pcmcia_socket.
drivers/pcmcia/bulkmem.c | 12 ++---
drivers/pcmcia/cardbus.c | 12 ++---
drivers/pcmcia/cistpl.c | 26 +++++------
drivers/pcmcia/cs.c | 98 +++++++++++++++++++++----------------------
drivers/pcmcia/cs_internal.h | 27 +++++------
drivers/pcmcia/rsrc_mgr.c | 20 ++++----
include/pcmcia/ss.h | 4 -
7 files changed, 96 insertions(+), 103 deletions(-)
diff -ruN linux-original/drivers/pcmcia/bulkmem.c linux/drivers/pcmcia/bulkmem.c
--- linux-original/drivers/pcmcia/bulkmem.c 2003-06-11 18:35:04.000000000 +0200
+++ linux/drivers/pcmcia/bulkmem.c 2003-06-11 21:48:45.000000000 +0200
@@ -63,7 +63,7 @@
{
int ret, tries;
client_t *mtd;
- socket_info_t *s;
+ struct pcmcia_socket *s;
mtd = handle->mtd;
if (mtd == NULL)
@@ -130,7 +130,7 @@
eraseq_entry_t *erase = busy->erase;
mtd_request_t req;
client_t *mtd;
- socket_info_t *s;
+ struct pcmcia_socket *s;
int ret;
DEBUG(2, "cs: trying erase request 0x%p...\n", busy);
@@ -265,7 +265,7 @@
static int mtd_set_vpp(client_handle_t handle, mtd_vpp_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
if (req->Vpp1 != req->Vpp2)
@@ -279,7 +279,7 @@
static int mtd_rdy_mask(client_handle_t handle, mtd_rdy_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
@@ -417,7 +417,7 @@
int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn)
{
- socket_info_t *s = SOCKET(handle);
+ struct pcmcia_socket *s = SOCKET(handle);
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
@@ -450,7 +450,7 @@
int pcmcia_register_mtd(client_handle_t handle, mtd_reg_t *reg)
{
memory_handle_t list;
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
diff -ruN linux-original/drivers/pcmcia/cardbus.c linux/drivers/pcmcia/cardbus.c
--- linux-original/drivers/pcmcia/cardbus.c 2003-06-11 18:11:47.000000000 +0200
+++ linux/drivers/pcmcia/cardbus.c 2003-06-11 21:49:10.000000000 +0200
@@ -119,11 +119,11 @@
These are similar to setup_cis_mem and release_cis_mem for 16-bit
cards. The "result" that is used externally is the cb_cis_virt
- pointer in the socket_info_t structure.
+ pointer in the struct pcmcia_socket structure.
=====================================================================*/
-static void cb_release_cis_mem(socket_info_t * s)
+static void cb_release_cis_mem(struct pcmcia_socket * s)
{
if (s->cb_cis_virt) {
DEBUG(1, "cs: cb_release_cis_mem()\n");
@@ -133,7 +133,7 @@
}
}
-static int cb_setup_cis_mem(socket_info_t * s, struct resource *res)
+static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res)
{
unsigned int start, size;
@@ -162,7 +162,7 @@
=====================================================================*/
-int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr)
+int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void *ptr)
{
struct pci_dev *dev;
struct resource *res;
@@ -237,7 +237,7 @@
}
}
-int cb_alloc(socket_info_t * s)
+int cb_alloc(struct pcmcia_socket * s)
{
struct pci_bus *bus = s->cap.cb_dev->subordinate;
struct pci_dev *dev;
@@ -266,7 +266,7 @@
return CS_SUCCESS;
}
-void cb_free(socket_info_t * s)
+void cb_free(struct pcmcia_socket * s)
{
struct pci_dev *bridge = s->cap.cb_dev;
diff -ruN linux-original/drivers/pcmcia/cistpl.c linux/drivers/pcmcia/cistpl.c
--- linux-original/drivers/pcmcia/cistpl.c 2003-06-11 18:30:33.000000000 +0200
+++ linux/drivers/pcmcia/cistpl.c 2003-06-11 21:49:29.000000000 +0200
@@ -82,7 +82,7 @@
INT_MODULE_PARM(cis_width, 0); /* 16-bit CIS? */
-void release_cis_mem(socket_info_t *s)
+void release_cis_mem(struct pcmcia_socket *s)
{
if (s->cis_mem.sys_start != 0) {
s->cis_mem.flags &= ~MAP_ACTIVE;
@@ -101,7 +101,7 @@
* map the memory space.
*/
static unsigned char *
-set_cis_map(socket_info_t *s, unsigned int card_offset, unsigned int flags)
+set_cis_map(struct pcmcia_socket *s, unsigned int card_offset, unsigned int flags)
{
pccard_mem_map *mem = &s->cis_mem;
if (!(s->cap.features & SS_CAP_STATIC_MAP) &&
@@ -139,7 +139,7 @@
#define IS_ATTR 1
#define IS_INDIRECT 8
-int read_cis_mem(socket_info_t *s, int attr, u_int addr,
+int read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
u_char *sys, *end, *buf = ptr;
@@ -202,7 +202,7 @@
return 0;
}
-void write_cis_mem(socket_info_t *s, int attr, u_int addr,
+void write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
u_char *sys, *end, *buf = ptr;
@@ -266,7 +266,7 @@
======================================================================*/
-static void read_cis_cache(socket_info_t *s, int attr, u_int addr,
+static void read_cis_cache(struct pcmcia_socket *s, int attr, u_int addr,
u_int len, void *ptr)
{
struct cis_cache_entry *cis;
@@ -306,7 +306,7 @@
}
static void
-remove_cis_cache(socket_info_t *s, int attr, u_int addr, u_int len)
+remove_cis_cache(struct pcmcia_socket *s, int attr, u_int addr, u_int len)
{
struct cis_cache_entry *cis;
@@ -318,7 +318,7 @@
}
}
-void destroy_cis_cache(socket_info_t *s)
+void destroy_cis_cache(struct pcmcia_socket *s)
{
struct list_head *l, *n;
@@ -337,7 +337,7 @@
======================================================================*/
-int verify_cis_cache(socket_info_t *s)
+int verify_cis_cache(struct pcmcia_socket *s)
{
struct cis_cache_entry *cis;
char buf[256];
@@ -369,7 +369,7 @@
int pcmcia_replace_cis(client_handle_t handle, cisdump_t *cis)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
@@ -409,7 +409,7 @@
int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return CS_BAD_HANDLE;
s = SOCKET(handle);
@@ -445,7 +445,7 @@
return pcmcia_get_next_tuple(handle, tuple);
}
-static int follow_link(socket_info_t *s, tuple_t *tuple)
+static int follow_link(struct pcmcia_socket *s, tuple_t *tuple)
{
u_char link[5];
u_int ofs;
@@ -487,7 +487,7 @@
int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
u_char link[2], tmp;
int ofs, i, attr;
@@ -588,7 +588,7 @@
int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
u_int len;
if (CHECK_HANDLE(handle))
diff -ruN linux-original/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
--- linux-original/drivers/pcmcia/cs.c 2003-06-11 18:39:31.000000000 +0200
+++ linux/drivers/pcmcia/cs.c 2003-06-11 21:50:17.000000000 +0200
@@ -237,7 +237,7 @@
======================================================================*/
-static int register_callback(socket_info_t *s, void (*handler)(void *, unsigned int), void * info)
+static int register_callback(struct pcmcia_socket *s, void (*handler)(void *, unsigned int), void * info)
{
int error;
@@ -249,33 +249,33 @@
return error;
}
-static int get_socket_status(socket_info_t *s, int *val)
+static int get_socket_status(struct pcmcia_socket *s, int *val)
{
return s->ss_entry->get_status(s, val);
}
-static int set_socket(socket_info_t *s, socket_state_t *state)
+static int set_socket(struct pcmcia_socket *s, socket_state_t *state)
{
return s->ss_entry->set_socket(s, state);
}
-static int set_io_map(socket_info_t *s, struct pccard_io_map *io)
+static int set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
{
return s->ss_entry->set_io_map(s, io);
}
-static int set_mem_map(socket_info_t *s, struct pccard_mem_map *mem)
+static int set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem)
{
return s->ss_entry->set_mem_map(s, mem);
}
-static int suspend_socket(socket_info_t *s)
+static int suspend_socket(struct pcmcia_socket *s)
{
s->socket = dead_socket;
return s->ss_entry->suspend(s);
}
-static int init_socket(socket_info_t *s)
+static int init_socket(struct pcmcia_socket *s)
{
s->socket = dead_socket;
return s->ss_entry->init(s);
@@ -287,7 +287,7 @@
static int proc_read_clients(char *buf, char **start, off_t pos,
int count, int *eof, void *data)
{
- socket_info_t *s = data;
+ struct pcmcia_socket *s = data;
client_handle_t c;
char *p = buf;
@@ -313,8 +313,8 @@
* These functions check for the appropriate struct pcmcia_soket arrays,
* and pass them to the low-level functions pcmcia_{suspend,resume}_socket
*/
-static int socket_resume(socket_info_t *skt);
-static int socket_suspend(socket_info_t *skt);
+static int socket_resume(struct pcmcia_socket *skt);
+static int socket_suspend(struct pcmcia_socket *skt);
int pcmcia_socket_dev_suspend(struct device *dev, u32 state, u32 level)
{
@@ -548,9 +548,9 @@
}
}
-static int send_event(socket_info_t *s, event_t event, int priority);
+static int send_event(struct pcmcia_socket *s, event_t event, int priority);
-static void shutdown_socket(socket_info_t *s)
+static void shutdown_socket(struct pcmcia_socket *s)
{
client_t **c;
@@ -605,7 +605,7 @@
======================================================================*/
-static int send_event(socket_info_t *s, event_t event, int priority)
+static int send_event(struct pcmcia_socket *s, event_t event, int priority)
{
client_t *client = s->clients;
int ret;
@@ -626,7 +626,7 @@
return ret;
} /* send_event */
-static void pcmcia_error(socket_info_t *skt, const char *fmt, ...)
+static void pcmcia_error(struct pcmcia_socket *skt, const char *fmt, ...)
{
static char buf[128];
va_list ap;
@@ -642,7 +642,7 @@
#define cs_to_timeout(cs) (((cs) * HZ + 99) / 100)
-static void socket_remove_drivers(socket_info_t *skt)
+static void socket_remove_drivers(struct pcmcia_socket *skt)
{
client_t *client;
@@ -653,7 +653,7 @@
client->state |= CLIENT_STALE;
}
-static void socket_shutdown(socket_info_t *skt)
+static void socket_shutdown(struct pcmcia_socket *skt)
{
socket_remove_drivers(skt);
set_current_state(TASK_UNINTERRUPTIBLE);
@@ -662,7 +662,7 @@
shutdown_socket(skt);
}
-static int socket_reset(socket_info_t *skt)
+static int socket_reset(struct pcmcia_socket *skt)
{
int status, i;
@@ -692,7 +692,7 @@
return CS_GENERAL_FAILURE;
}
-static int socket_setup(socket_info_t *skt, int initial_delay)
+static int socket_setup(struct pcmcia_socket *skt, int initial_delay)
{
int status, i;
@@ -756,7 +756,7 @@
* Handle card insertion. Setup the socket, reset the card,
* and then tell the rest of PCMCIA that a card is present.
*/
-static int socket_insert(socket_info_t *skt)
+static int socket_insert(struct pcmcia_socket *skt)
{
int ret;
@@ -776,7 +776,7 @@
return ret;
}
-static int socket_suspend(socket_info_t *skt)
+static int socket_suspend(struct pcmcia_socket *skt)
{
if (skt->state & SOCKET_SUSPEND)
return CS_IN_USE;
@@ -793,7 +793,7 @@
* our cached copy. If they are different, the card has been
* replaced, and we need to tell the drivers.
*/
-static int socket_resume(socket_info_t *skt)
+static int socket_resume(struct pcmcia_socket *skt)
{
int ret;
@@ -825,7 +825,7 @@
static int pccardd(void *__skt)
{
- socket_info_t *skt = __skt;
+ struct pcmcia_socket *skt = __skt;
DECLARE_WAITQUEUE(wait, current);
daemonize("pccardd");
@@ -882,7 +882,7 @@
static void parse_events(void *info, u_int events)
{
- socket_info_t *s = info;
+ struct pcmcia_socket *s = info;
spin_lock(&s->thread_lock);
s->thread_events |= events;
@@ -898,7 +898,7 @@
======================================================================*/
-static int alloc_io_space(socket_info_t *s, u_int attr, ioaddr_t *base,
+static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,
ioaddr_t num, u_int lines, char *name)
{
int i;
@@ -962,7 +962,7 @@
return (i == MAX_IO_WIN);
} /* alloc_io_space */
-static void release_io_space(socket_info_t *s, ioaddr_t base,
+static void release_io_space(struct pcmcia_socket *s, ioaddr_t base,
ioaddr_t num)
{
int i;
@@ -990,7 +990,7 @@
int pcmcia_access_configuration_register(client_handle_t handle,
conf_reg_t *reg)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
int addr;
u_char val;
@@ -1076,7 +1076,7 @@
int pcmcia_bind_mtd(mtd_bind_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
memory_handle_t region;
s = req->Socket;
@@ -1106,7 +1106,7 @@
int pcmcia_deregister_client(client_handle_t handle)
{
client_t **client;
- socket_info_t *s;
+ struct pcmcia_socket *s;
memory_handle_t region;
u_long flags;
int i;
@@ -1161,7 +1161,7 @@
int pcmcia_get_configuration_info(client_handle_t handle,
config_info_t *config)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
if (CHECK_HANDLE(handle))
@@ -1256,7 +1256,7 @@
int pcmcia_get_first_client(client_handle_t *handle, client_req_t *req)
{
socket_t s;
- socket_info_t *socket;
+ struct pcmcia_socket *socket;
if (req->Attributes & CLIENT_THIS_SOCKET)
s = req->Socket;
else
@@ -1274,7 +1274,7 @@
int pcmcia_get_next_client(client_handle_t *handle, client_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if ((handle == NULL) || CHECK_HANDLE(*handle))
return CS_BAD_HANDLE;
if ((*handle)->next == NULL) {
@@ -1293,7 +1293,7 @@
int pcmcia_get_window(window_handle_t *handle, int idx, win_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
window_t *win;
int w;
@@ -1348,7 +1348,7 @@
struct pci_bus *pcmcia_lookup_bus(client_handle_t handle)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle))
return NULL;
@@ -1372,7 +1372,7 @@
int pcmcia_get_status(client_handle_t handle, cs_status_t *status)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
int val;
@@ -1451,7 +1451,7 @@
int pcmcia_map_mem_page(window_handle_t win, memreq_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if ((win == NULL) || (win->magic != WINDOW_MAGIC))
return CS_BAD_HANDLE;
if (req->Page != 0)
@@ -1472,7 +1472,7 @@
int pcmcia_modify_configuration(client_handle_t handle,
modconf_t *mod)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
if (CHECK_HANDLE(handle))
@@ -1618,7 +1618,7 @@
int pcmcia_release_configuration(client_handle_t handle)
{
pccard_io_map io = { 0, 0, 0, 0, 1 };
- socket_info_t *s;
+ struct pcmcia_socket *s;
int i;
if (CHECK_HANDLE(handle) ||
@@ -1668,7 +1668,7 @@
int pcmcia_release_io(client_handle_t handle, io_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle) || !(handle->state & CLIENT_IO_REQ))
return CS_BAD_HANDLE;
@@ -1703,7 +1703,7 @@
int pcmcia_release_irq(client_handle_t handle, irq_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if (CHECK_HANDLE(handle) || !(handle->state & CLIENT_IRQ_REQ))
return CS_BAD_HANDLE;
handle->state &= ~CLIENT_IRQ_REQ;
@@ -1739,7 +1739,7 @@
int pcmcia_release_window(window_handle_t win)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
if ((win == NULL) || (win->magic != WINDOW_MAGIC))
return CS_BAD_HANDLE;
@@ -1769,7 +1769,7 @@
{
int i;
u_int base;
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
pccard_io_map iomap;
@@ -1898,7 +1898,7 @@
int pcmcia_request_io(client_handle_t handle, io_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
if (CHECK_HANDLE(handle))
@@ -1962,7 +1962,7 @@
int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
config_t *c;
int ret = 0, irq = 0;
@@ -2037,7 +2037,7 @@
int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle_t *wh)
{
- socket_info_t *s;
+ struct pcmcia_socket *s;
window_t *win;
u_long align;
int w;
@@ -2122,7 +2122,7 @@
int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
{
- socket_info_t *skt;
+ struct pcmcia_socket *skt;
int ret;
if (CHECK_HANDLE(handle))
@@ -2171,7 +2171,7 @@
int pcmcia_suspend_card(client_handle_t handle, client_req_t *req)
{
- socket_info_t *skt;
+ struct pcmcia_socket *skt;
int ret;
if (CHECK_HANDLE(handle))
@@ -2198,7 +2198,7 @@
int pcmcia_resume_card(client_handle_t handle, client_req_t *req)
{
- socket_info_t *skt;
+ struct pcmcia_socket *skt;
int ret;
if (CHECK_HANDLE(handle))
@@ -2231,7 +2231,7 @@
int pcmcia_eject_card(client_handle_t handle, client_req_t *req)
{
- socket_info_t *skt;
+ struct pcmcia_socket *skt;
int ret;
if (CHECK_HANDLE(handle))
@@ -2260,7 +2260,7 @@
int pcmcia_insert_card(client_handle_t handle, client_req_t *req)
{
- socket_info_t *skt;
+ struct pcmcia_socket *skt;
int ret;
if (CHECK_HANDLE(handle))
diff -ruN linux-original/drivers/pcmcia/cs_internal.h linux/drivers/pcmcia/cs_internal.h
--- linux-original/drivers/pcmcia/cs_internal.h 2003-06-11 18:35:04.000000000 +0200
+++ linux/drivers/pcmcia/cs_internal.h 2003-06-11 21:48:14.000000000 +0200
@@ -92,9 +92,6 @@
unsigned char cache[0];
};
-/* deprecated - use struct pcmcia_socket instead */
-typedef struct pcmcia_socket socket_info_t;
-
/* Flags in config state */
#define CONFIG_LOCKED 0x01
#define CONFIG_IRQ_REQ 0x02
@@ -131,19 +128,19 @@
((h)->event_handler((e), (p), &(h)->event_callback_args))
/* In cardbus.c */
-int cb_alloc(socket_info_t *s);
-void cb_free(socket_info_t *s);
-int read_cb_mem(socket_info_t *s, int space, u_int addr, u_int len, void *ptr);
+int cb_alloc(struct pcmcia_socket *s);
+void cb_free(struct pcmcia_socket *s);
+int read_cb_mem(struct pcmcia_socket *s, int space, u_int addr, u_int len, void *ptr);
/* In cistpl.c */
-int read_cis_mem(socket_info_t *s, int attr,
+int read_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
-void write_cis_mem(socket_info_t *s, int attr,
+void write_cis_mem(struct pcmcia_socket *s, int attr,
u_int addr, u_int len, void *ptr);
-void release_cis_mem(socket_info_t *s);
-void destroy_cis_cache(socket_info_t *s);
-int verify_cis_cache(socket_info_t *s);
-void preload_cis_cache(socket_info_t *s);
+void release_cis_mem(struct pcmcia_socket *s);
+void destroy_cis_cache(struct pcmcia_socket *s);
+int verify_cis_cache(struct pcmcia_socket *s);
+void preload_cis_cache(struct pcmcia_socket *s);
int get_first_tuple(client_handle_t handle, tuple_t *tuple);
int get_next_tuple(client_handle_t handle, tuple_t *tuple);
int get_tuple_data(client_handle_t handle, tuple_t *tuple);
@@ -167,11 +164,11 @@
int copy_memory(memory_handle_t handle, copy_op_t *req);
/* In rsrc_mgr */
-void validate_mem(socket_info_t *s);
+void validate_mem(struct pcmcia_socket *s);
int find_io_region(ioaddr_t *base, ioaddr_t num, ioaddr_t align,
- char *name, socket_info_t *s);
+ char *name, struct pcmcia_socket *s);
int find_mem_region(u_long *base, u_long num, u_long align,
- int force_low, char *name, socket_info_t *s);
+ int force_low, char *name, struct pcmcia_socket *s);
int try_irq(u_int Attributes, int irq, int specific);
void undo_irq(u_int Attributes, int irq);
int adjust_resource_info(client_handle_t handle, adjust_t *adj);
diff -ruN linux-original/drivers/pcmcia/rsrc_mgr.c linux/drivers/pcmcia/rsrc_mgr.c
--- linux-original/drivers/pcmcia/rsrc_mgr.c 2003-06-11 18:30:33.000000000 +0200
+++ linux/drivers/pcmcia/rsrc_mgr.c 2003-06-11 21:53:45.000000000 +0200
@@ -90,7 +90,7 @@
typedef struct irq_info_t {
u_int Attributes;
int time_share, dyn_share;
- struct socket_info_t *Socket;
+ struct pcmcia_socket *Socket;
} irq_info_t;
/* Table of IRQ assignments */
@@ -341,7 +341,7 @@
======================================================================*/
/* Validation function for cards with a valid CIS */
-static int cis_readable(socket_info_t *s, u_long base)
+static int cis_readable(struct pcmcia_socket *s, u_long base)
{
cisinfo_t info1, info2;
int ret;
@@ -364,7 +364,7 @@
}
/* Validation function for simple memory cards */
-static int checksum(socket_info_t *s, u_long base)
+static int checksum(struct pcmcia_socket *s, u_long base)
{
int i, a, b, d;
s->cis_mem.sys_start = base;
@@ -383,7 +383,7 @@
return (b == -1) ? -1 : (a>>1);
}
-static int checksum_match(socket_info_t *s, u_long base)
+static int checksum_match(struct pcmcia_socket *s, u_long base)
{
int a = checksum(s, base), b = checksum(s, base+s->cap.map_size);
return ((a == b) && (a >= 0));
@@ -397,7 +397,7 @@
======================================================================*/
-static int do_mem_probe(u_long base, u_long num, socket_info_t *s)
+static int do_mem_probe(u_long base, u_long num, struct pcmcia_socket *s)
{
u_long i, j, bad, fail, step;
@@ -435,7 +435,7 @@
#ifdef CONFIG_PCMCIA_PROBE
-static u_long inv_probe(resource_map_t *m, socket_info_t *s)
+static u_long inv_probe(resource_map_t *m, struct pcmcia_socket *s)
{
u_long ok;
if (m == &mem_db)
@@ -451,7 +451,7 @@
return do_mem_probe(m->base, m->num, s);
}
-void validate_mem(socket_info_t *s)
+void validate_mem(struct pcmcia_socket *s)
{
resource_map_t *m, *n;
static u_char order[] = { 0xd0, 0xe0, 0xc0, 0xf0 };
@@ -497,7 +497,7 @@
#else /* CONFIG_PCMCIA_PROBE */
-void validate_mem(socket_info_t *s)
+void validate_mem(struct pcmcia_socket *s)
{
resource_map_t *m, *n;
static int done = 0;
@@ -529,7 +529,7 @@
======================================================================*/
int find_io_region(ioaddr_t *base, ioaddr_t num, ioaddr_t align,
- char *name, socket_info_t *s)
+ char *name, struct pcmcia_socket *s)
{
ioaddr_t try;
resource_map_t *m;
@@ -556,7 +556,7 @@
}
int find_mem_region(u_long *base, u_long num, u_long align,
- int force_low, char *name, socket_info_t *s)
+ int force_low, char *name, struct pcmcia_socket *s)
{
u_long try;
resource_map_t *m;
diff -ruN linux-original/include/pcmcia/ss.h linux/include/pcmcia/ss.h
--- linux-original/include/pcmcia/ss.h 2003-06-11 18:30:33.000000000 +0200
+++ linux/include/pcmcia/ss.h 2003-06-11 21:52:14.000000000 +0200
@@ -189,10 +189,6 @@
struct config_t;
struct region_t;
-/* in parts of drivers/pcmcia/ this is still known as
- * socket_info_t
- */
-
struct pcmcia_socket {
spinlock_t lock;
struct pccard_operations * ss_entry;
-------------- next part --------------
This file should have been removed in unify_yenta_pci_socket
already...
pci_socket.h | 48 ------------------------------------------------
1 files changed, 48 deletions(-)
diff -ruN linux-original/drivers/pcmcia/pci_socket.h linux/drivers/pcmcia/pci_socket.h
--- linux-original/drivers/pcmcia/pci_socket.h 2003-06-11 18:15:54.000000000 +0200
+++ linux/drivers/pcmcia/pci_socket.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,48 +0,0 @@
-/*
- * drivers/pcmcia/pci_socket.h
- *
- * (C) Copyright 1999 Linus Torvalds
- */
-
-#ifndef __PCI_SOCKET_H
-#define __PCI_SOCKET_H
-
-struct pci_socket_ops;
-struct socket_info_t;
-
-typedef struct pci_socket {
- struct pci_dev *dev;
- int cb_irq, io_irq;
- void *base;
- void (*handler)(void *, unsigned int);
- void *info;
- struct pci_socket_ops *op;
- socket_cap_t cap;
- spinlock_t event_lock;
- unsigned int events;
- struct work_struct tq_task;
- struct timer_list poll_timer;
-
- struct pcmcia_socket socket;
- /* A few words of private data for the low-level driver.. */
- unsigned int private[8];
-} pci_socket_t;
-
-struct pci_socket_ops {
- int (*open)(struct pci_socket *);
- void (*close)(struct pci_socket *);
-
- int (*init)(struct pci_socket *);
- int (*suspend)(struct pci_socket *);
- int (*get_status)(struct pci_socket *, unsigned int *);
- int (*get_socket)(struct pci_socket *, socket_state_t *);
- int (*set_socket)(struct pci_socket *, socket_state_t *);
- int (*set_io_map)(struct pci_socket *, struct pccard_io_map *);
- int (*set_mem_map)(struct pci_socket *, struct pccard_mem_map *);
- void (*proc_setup)(struct pci_socket *, struct proc_dir_entry *base);
-};
-
-extern struct pci_socket_ops yenta_operations;
-extern struct pci_socket_ops ricoh_operations;
-
-#endif
-------------- next part --------------
Rename the socket_info_t inside tcic.c to struct i82365_socket. At one
time there were at least five different "socket_info_t" within cardmgr
/ linux/drivers/pcmcia. Let's get rid of all of them to avoid
confusion in future.
i82365.c | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff -ruN linux-original/drivers/pcmcia/i82365.c linux/drivers/pcmcia/i82365.c
--- linux-original/drivers/pcmcia/i82365.c 2003-06-11 22:23:47.000000000 +0200
+++ linux/drivers/pcmcia/i82365.c 2003-06-11 22:27:56.000000000 +0200
@@ -158,7 +158,7 @@
u_char ctl, ema;
} vg46x_state_t;
-typedef struct socket_info_t {
+struct i82365_socket {
u_short type, flags;
struct pcmcia_socket socket;
unsigned int number;
@@ -175,11 +175,11 @@
cirrus_state_t cirrus;
vg46x_state_t vg46x;
} state;
-} socket_info_t;
+};
/* Where we keep track of our sockets... */
static int sockets = 0;
-static socket_info_t socket[8] = {
+static struct i82365_socket socket[8] = {
{ 0, }, /* ... */
};
@@ -351,7 +351,7 @@
static u_int __init cirrus_set_opts(u_short s, char *buf)
{
- socket_info_t *t = &socket[s];
+ struct i82365_socket *t = &socket[s];
cirrus_state_t *p = &socket[s].state.cirrus;
u_int mask = 0xffff;
@@ -457,7 +457,7 @@
static void get_bridge_state(u_short s)
{
- socket_info_t *t = &socket[s];
+ struct i82365_socket *t = &socket[s];
if (t->flags & IS_CIRRUS)
cirrus_get_state(s);
else if (t->flags & IS_VADEM)
@@ -466,7 +466,7 @@
static void set_bridge_state(u_short s)
{
- socket_info_t *t = &socket[s];
+ struct i82365_socket *t = &socket[s];
if (t->flags & IS_CIRRUS)
cirrus_set_state(s);
else {
@@ -708,7 +708,7 @@
{
u_int mask = 0, i, base;
int use_pci = 0, isa_irq = 0;
- socket_info_t *t = &socket[sockets-ns];
+ struct i82365_socket *t = &socket[sockets-ns];
base = sockets-ns;
if (t->ioaddr > 0) request_region(t->ioaddr, 2, "i82365");
@@ -975,7 +975,7 @@
static int pcic_register_callback(struct pcmcia_socket *s, void (*handler)(void *, unsigned int), void * info)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
socket[sock].handler = handler;
socket[sock].info = info;
return 0;
@@ -985,7 +985,7 @@
static int pcic_inquire_socket(struct pcmcia_socket *s, socket_cap_t *cap)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
*cap = socket[sock].cap;
return 0;
} /* pcic_inquire_socket */
@@ -1029,7 +1029,7 @@
static int i365_get_socket(u_short sock, socket_state_t *state)
{
- socket_info_t *t = &socket[sock];
+ struct i82365_socket *t = &socket[sock];
u_char reg, vcc, vpp;
reg = i365_get(sock, I365_POWER);
@@ -1101,7 +1101,7 @@
static int i365_set_socket(u_short sock, socket_state_t *state)
{
- socket_info_t *t = &socket[sock];
+ struct i82365_socket *t = &socket[sock];
u_char reg;
DEBUG(1, "i82365: SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
@@ -1297,7 +1297,7 @@
static int proc_read_info(char *buf, char **start, off_t pos,
int count, int *eof, void *data)
{
- socket_info_t *s = data;
+ struct i82365_socket *s = data;
char *p = buf;
p += sprintf(p, "type: %s\npsock: %d\n",
pcic[s->type].name, s->psock);
@@ -1307,7 +1307,7 @@
static int proc_read_exca(char *buf, char **start, off_t pos,
int count, int *eof, void *data)
{
- u_short sock = (socket_info_t *)data - socket;
+ u_short sock = (struct i82365_socket *)data - socket;
char *p = buf;
int i, top;
@@ -1330,7 +1330,7 @@
static void pcic_proc_setup(struct pcmcia_socket *sock, struct proc_dir_entry *base)
{
- socket_info_t *s = container_of(sock, struct socket_info_t, socket);
+ struct i82365_socket *s = container_of(sock, struct i82365_socket, socket);
if (s->flags & IS_ALIVE)
return;
@@ -1370,7 +1370,7 @@
static int pcic_get_status(struct pcmcia_socket *s, u_int *value)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
if (socket[sock].flags & IS_ALIVE) {
*value = 0;
@@ -1382,7 +1382,7 @@
static int pcic_get_socket(struct pcmcia_socket *s, socket_state_t *state)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
if (socket[sock].flags & IS_ALIVE)
return -EINVAL;
@@ -1392,7 +1392,7 @@
static int pcic_set_socket(struct pcmcia_socket *s, socket_state_t *state)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
if (socket[sock].flags & IS_ALIVE)
return -EINVAL;
@@ -1402,7 +1402,7 @@
static int pcic_set_io_map(struct pcmcia_socket *s, struct pccard_io_map *io)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
if (socket[sock].flags & IS_ALIVE)
return -EINVAL;
@@ -1411,7 +1411,7 @@
static int pcic_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem)
{
- unsigned int sock = container_of(s, struct socket_info_t, socket)->number;
+ unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
if (socket[sock].flags & IS_ALIVE)
return -EINVAL;
-------------- next part --------------
Rename the socket_info_t inside tcic.c to struct tcic_socket. At one
time there were at least five different "socket_info_t" within cardmgr
/ linux/drivers/pcmcia. Let's get rid of all of them to avoid
confusion in future.
tcic.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff -ruN linux-original/drivers/pcmcia/tcic.c linux/drivers/pcmcia/tcic.c
--- linux-original/drivers/pcmcia/tcic.c 2003-06-11 18:30:33.000000000 +0200
+++ linux/drivers/pcmcia/tcic.c 2003-06-11 22:26:27.000000000 +0200
@@ -115,20 +115,20 @@
static void tcic_timer(u_long data);
static struct pccard_operations tcic_operations;
-typedef struct socket_info_t {
+struct tcic_socket {
u_short psock;
void (*handler)(void *info, u_int events);
void *info;
u_char last_sstat;
u_char id;
struct pcmcia_socket socket;
-} socket_info_t;
+};
static struct timer_list poll_timer;
static int tcic_timer_pending;
static int sockets;
-static socket_info_t socket_table[2];
+static struct tcic_socket socket_table[2];
static socket_cap_t tcic_cap = {
/* only 16-bit cards, memory windows must be size-aligned */
@@ -646,7 +646,7 @@
static int tcic_register_callback(struct pcmcia_socket *sock, void (*handler)(void *, unsigned int), void * info)
{
- u_short psock = container_of(sock, socket_info_t, socket)->psock;
+ u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
socket_table[psock].handler = handler;
socket_table[psock].info = info;
return 0;
@@ -656,7 +656,7 @@
static int tcic_get_status(struct pcmcia_socket *sock, u_int *value)
{
- u_short psock = container_of(sock, socket_info_t, socket)->psock;
+ u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
u_char reg;
tcic_setl(TCIC_ADDR, (psock << TCIC_ADDR_SS_SHFT)
@@ -690,7 +690,7 @@
static int tcic_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
{
- u_short psock = container_of(sock, socket_info_t, socket)->psock;
+ u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
u_char reg;
u_short scf1, scf2;
@@ -743,7 +743,7 @@
static int tcic_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
{
- u_short psock = container_of(sock, socket_info_t, socket)->psock;
+ u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
u_char reg;
u_short scf1, scf2;
@@ -818,7 +818,7 @@
static int tcic_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io)
{
- u_short psock = container_of(sock, socket_info_t, socket)->psock;
+ u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
u_int addr;
u_short base, len, ioctl;
@@ -855,7 +855,7 @@
static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *mem)
{
- u_short psock = container_of(sock, socket_info_t, socket)->psock;
+ u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
u_short addr, ctl;
u_long base, len, mmap;
More information about the linux-pcmcia
mailing list