Commit fba395ee authored by Dominik Brodowski's avatar Dominik Brodowski

[PATCH] pcmcia: remove dev_link_t and client_handle_t indirection

dev_link_t * and client_handle_t both mean struct pcmcai_device * by now.
Therefore, remove all such indirections.
Signed-off-by: 's avatarDominik Brodowski <linux@dominikbrodowski.net>
parent fd238232
......@@ -85,8 +85,8 @@ typedef struct bluecard_info_t {
} bluecard_info_t;
static void bluecard_config(dev_link_t *link);
static void bluecard_release(dev_link_t *link);
static void bluecard_config(struct pcmcia_device *link);
static void bluecard_release(struct pcmcia_device *link);
static void bluecard_detach(struct pcmcia_device *p_dev);
......@@ -856,17 +856,16 @@ static int bluecard_close(bluecard_info_t *info)
return 0;
}
static int bluecard_attach(struct pcmcia_device *p_dev)
static int bluecard_attach(struct pcmcia_device *link)
{
bluecard_info_t *info;
dev_link_t *link = dev_to_instance(p_dev);
/* Create new info device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
info->p_dev = p_dev;
info->p_dev = link;
link->priv = info;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
......@@ -887,9 +886,8 @@ static int bluecard_attach(struct pcmcia_device *p_dev)
}
static void bluecard_detach(struct pcmcia_device *p_dev)
static void bluecard_detach(struct pcmcia_device *link)
{
dev_link_t *link = dev_to_instance(p_dev);
bluecard_info_t *info = link->priv;
if (link->state & DEV_CONFIG)
......@@ -899,7 +897,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev)
}
static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
int i;
......@@ -914,9 +912,8 @@ static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse
return pcmcia_parse_tuple(handle, tuple, parse);
}
static void bluecard_config(dev_link_t *link)
static void bluecard_config(struct pcmcia_device *link)
{
client_handle_t handle = link->handle;
bluecard_info_t *info = link->priv;
tuple_t tuple;
u_short buf[256];
......@@ -930,7 +927,7 @@ static void bluecard_config(dev_link_t *link)
/* Get configuration register information */
tuple.DesiredTuple = CISTPL_CONFIG;
last_ret = first_tuple(handle, &tuple, &parse);
last_ret = first_tuple(link, &tuple, &parse);
if (last_ret != CS_SUCCESS) {
last_fn = ParseTuple;
goto cs_failed;
......@@ -947,25 +944,25 @@ static void bluecard_config(dev_link_t *link)
for (n = 0; n < 0x400; n += 0x40) {
link->io.BasePort1 = n ^ 0x300;
i = pcmcia_request_io(link->handle, &link->io);
i = pcmcia_request_io(link, &link->io);
if (i == CS_SUCCESS)
break;
}
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIO, i);
cs_error(link, RequestIO, i);
goto failed;
}
i = pcmcia_request_irq(link->handle, &link->irq);
i = pcmcia_request_irq(link, &link->irq);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIRQ, i);
cs_error(link, RequestIRQ, i);
link->irq.AssignedIRQ = 0;
}
i = pcmcia_request_configuration(link->handle, &link->conf);
i = pcmcia_request_configuration(link, &link->conf);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestConfiguration, i);
cs_error(link, RequestConfiguration, i);
goto failed;
}
......@@ -979,14 +976,14 @@ static void bluecard_config(dev_link_t *link)
return;
cs_failed:
cs_error(link->handle, last_fn, last_ret);
cs_error(link, last_fn, last_ret);
failed:
bluecard_release(link);
}
static void bluecard_release(dev_link_t *link)
static void bluecard_release(struct pcmcia_device *link)
{
bluecard_info_t *info = link->priv;
......@@ -995,7 +992,7 @@ static void bluecard_release(dev_link_t *link)
del_timer(&(info->timer));
pcmcia_disable_device(link->handle);
pcmcia_disable_device(link);
}
static struct pcmcia_device_id bluecard_ids[] = {
......
......@@ -88,8 +88,8 @@ typedef struct bt3c_info_t {
} bt3c_info_t;
static void bt3c_config(dev_link_t *link);
static void bt3c_release(dev_link_t *link);
static void bt3c_config(struct pcmcia_device *link);
static void bt3c_release(struct pcmcia_device *link);
static void bt3c_detach(struct pcmcia_device *p_dev);
......@@ -645,17 +645,16 @@ static int bt3c_close(bt3c_info_t *info)
return 0;
}
static int bt3c_attach(struct pcmcia_device *p_dev)
static int bt3c_attach(struct pcmcia_device *link)
{
bt3c_info_t *info;
dev_link_t *link = dev_to_instance(p_dev);
/* Create new info device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
info->p_dev = p_dev;
info->p_dev = link;
link->priv = info;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
......@@ -676,9 +675,8 @@ static int bt3c_attach(struct pcmcia_device *p_dev)
}
static void bt3c_detach(struct pcmcia_device *p_dev)
static void bt3c_detach(struct pcmcia_device *link)
{
dev_link_t *link = dev_to_instance(p_dev);
bt3c_info_t *info = link->priv;
if (link->state & DEV_CONFIG)
......@@ -687,7 +685,7 @@ static void bt3c_detach(struct pcmcia_device *p_dev)
kfree(info);
}
static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
int i;
......@@ -698,24 +696,23 @@ static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
return pcmcia_parse_tuple(handle, tuple, parse);
}
static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
return CS_NO_MORE_ITEMS;
return get_tuple(handle, tuple, parse);
}
static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
return CS_NO_MORE_ITEMS;
return get_tuple(handle, tuple, parse);
}
static void bt3c_config(dev_link_t *link)
static void bt3c_config(struct pcmcia_device *link)
{
static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle;
bt3c_info_t *info = link->priv;
tuple_t tuple;
u_short buf[256];
......@@ -730,7 +727,7 @@ static void bt3c_config(dev_link_t *link)
/* Get configuration register information */
tuple.DesiredTuple = CISTPL_CONFIG;
last_ret = first_tuple(handle, &tuple, &parse);
last_ret = first_tuple(link, &tuple, &parse);
if (last_ret != CS_SUCCESS) {
last_fn = ParseTuple;
goto cs_failed;
......@@ -749,7 +746,7 @@ static void bt3c_config(dev_link_t *link)
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
/* Two tries: without IO aliases, then with aliases */
for (try = 0; try < 2; try++) {
i = first_tuple(handle, &tuple, &parse);
i = first_tuple(link, &tuple, &parse);
while (i != CS_NO_MORE_ITEMS) {
if (i != CS_SUCCESS)
goto next_entry;
......@@ -759,49 +756,49 @@ static void bt3c_config(dev_link_t *link)
link->conf.ConfigIndex = cf->index;
link->io.BasePort1 = cf->io.win[0].base;
link->io.IOAddrLines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
i = pcmcia_request_io(link->handle, &link->io);
i = pcmcia_request_io(link, &link->io);
if (i == CS_SUCCESS)
goto found_port;
}
next_entry:
i = next_tuple(handle, &tuple, &parse);
i = next_tuple(link, &tuple, &parse);
}
}
/* Second pass: try to find an entry that isn't picky about
its base address, then try to grab any standard serial port
address, and finally try to get any free port. */
i = first_tuple(handle, &tuple, &parse);
i = first_tuple(link, &tuple, &parse);
while (i != CS_NO_MORE_ITEMS) {
if ((i == CS_SUCCESS) && (cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
link->conf.ConfigIndex = cf->index;
for (j = 0; j < 5; j++) {
link->io.BasePort1 = base[j];
link->io.IOAddrLines = base[j] ? 16 : 3;
i = pcmcia_request_io(link->handle, &link->io);
i = pcmcia_request_io(link, &link->io);
if (i == CS_SUCCESS)
goto found_port;
}
}
i = next_tuple(handle, &tuple, &parse);
i = next_tuple(link, &tuple, &parse);
}
found_port:
if (i != CS_SUCCESS) {
BT_ERR("No usable port range found");
cs_error(link->handle, RequestIO, i);
cs_error(link, RequestIO, i);
goto failed;
}
i = pcmcia_request_irq(link->handle, &link->irq);
i = pcmcia_request_irq(link, &link->irq);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIRQ, i);
cs_error(link, RequestIRQ, i);
link->irq.AssignedIRQ = 0;
}
i = pcmcia_request_configuration(link->handle, &link->conf);
i = pcmcia_request_configuration(link, &link->conf);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestConfiguration, i);
cs_error(link, RequestConfiguration, i);
goto failed;
}
......@@ -815,21 +812,21 @@ found_port:
return;
cs_failed:
cs_error(link->handle, last_fn, last_ret);
cs_error(link, last_fn, last_ret);
failed:
bt3c_release(link);
}
static void bt3c_release(dev_link_t *link)
static void bt3c_release(struct pcmcia_device *link)
{
bt3c_info_t *info = link->priv;
if (link->state & DEV_PRESENT)
bt3c_close(info);
pcmcia_disable_device(link->handle);
pcmcia_disable_device(link);
}
......
......@@ -84,8 +84,8 @@ typedef struct btuart_info_t {
} btuart_info_t;
static void btuart_config(dev_link_t *link);
static void btuart_release(dev_link_t *link);
static void btuart_config(struct pcmcia_device *link);
static void btuart_release(struct pcmcia_device *link);
static void btuart_detach(struct pcmcia_device *p_dev);
......@@ -576,17 +576,16 @@ static int btuart_close(btuart_info_t *info)
return 0;
}
static int btuart_attach(struct pcmcia_device *p_dev)
static int btuart_attach(struct pcmcia_device *link)
{
btuart_info_t *info;
dev_link_t *link = dev_to_instance(p_dev);
/* Create new info device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
info->p_dev = p_dev;
info->p_dev = link;
link->priv = info;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
......@@ -607,9 +606,8 @@ static int btuart_attach(struct pcmcia_device *p_dev)
}
static void btuart_detach(struct pcmcia_device *p_dev)
static void btuart_detach(struct pcmcia_device *link)
{
dev_link_t *link = dev_to_instance(p_dev);
btuart_info_t *info = link->priv;
if (link->state & DEV_CONFIG)
......@@ -618,7 +616,7 @@ static void btuart_detach(struct pcmcia_device *p_dev)
kfree(info);
}
static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
int i;
......@@ -629,24 +627,23 @@ static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
return pcmcia_parse_tuple(handle, tuple, parse);
}
static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
return CS_NO_MORE_ITEMS;
return get_tuple(handle, tuple, parse);
}
static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
return CS_NO_MORE_ITEMS;
return get_tuple(handle, tuple, parse);
}
static void btuart_config(dev_link_t *link)
static void btuart_config(struct pcmcia_device *link)
{
static kio_addr_t base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
client_handle_t handle = link->handle;
btuart_info_t *info = link->priv;
tuple_t tuple;
u_short buf[256];
......@@ -661,7 +658,7 @@ static void btuart_config(dev_link_t *link)
/* Get configuration register information */
tuple.DesiredTuple = CISTPL_CONFIG;
last_ret = first_tuple(handle, &tuple, &parse);
last_ret = first_tuple(link, &tuple, &parse);
if (last_ret != CS_SUCCESS) {
last_fn = ParseTuple;
goto cs_failed;
......@@ -680,7 +677,7 @@ static void btuart_config(dev_link_t *link)
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
/* Two tries: without IO aliases, then with aliases */
for (try = 0; try < 2; try++) {
i = first_tuple(handle, &tuple, &parse);
i = first_tuple(link, &tuple, &parse);
while (i != CS_NO_MORE_ITEMS) {
if (i != CS_SUCCESS)
goto next_entry;
......@@ -690,19 +687,19 @@ static void btuart_config(dev_link_t *link)
link->conf.ConfigIndex = cf->index;
link->io.BasePort1 = cf->io.win[0].base;
link->io.IOAddrLines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
i = pcmcia_request_io(link->handle, &link->io);
i = pcmcia_request_io(link, &link->io);
if (i == CS_SUCCESS)
goto found_port;
}
next_entry:
i = next_tuple(handle, &tuple, &parse);
i = next_tuple(link, &tuple, &parse);
}
}
/* Second pass: try to find an entry that isn't picky about
its base address, then try to grab any standard serial port
address, and finally try to get any free port. */
i = first_tuple(handle, &tuple, &parse);
i = first_tuple(link, &tuple, &parse);
while (i != CS_NO_MORE_ITEMS) {
if ((i == CS_SUCCESS) && (cf->io.nwin > 0)
&& ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
......@@ -710,30 +707,30 @@ next_entry:
for (j = 0; j < 5; j++) {
link->io.BasePort1 = base[j];
link->io.IOAddrLines = base[j] ? 16 : 3;
i = pcmcia_request_io(link->handle, &link->io);
i = pcmcia_request_io(link, &link->io);
if (i == CS_SUCCESS)
goto found_port;
}
}
i = next_tuple(handle, &tuple, &parse);
i = next_tuple(link, &tuple, &parse);
}
found_port:
if (i != CS_SUCCESS) {
BT_ERR("No usable port range found");
cs_error(link->handle, RequestIO, i);
cs_error(link, RequestIO, i);
goto failed;
}
i = pcmcia_request_irq(link->handle, &link->irq);
i = pcmcia_request_irq(link, &link->irq);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIRQ, i);
cs_error(link, RequestIRQ, i);
link->irq.AssignedIRQ = 0;
}
i = pcmcia_request_configuration(link->handle, &link->conf);
i = pcmcia_request_configuration(link, &link->conf);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestConfiguration, i);
cs_error(link, RequestConfiguration, i);
goto failed;
}
......@@ -747,21 +744,21 @@ found_port:
return;
cs_failed:
cs_error(link->handle, last_fn, last_ret);
cs_error(link, last_fn, last_ret);
failed:
btuart_release(link);
}
static void btuart_release(dev_link_t *link)
static void btuart_release(struct pcmcia_device *link)
{
btuart_info_t *info = link->priv;
if (link->state & DEV_PRESENT)
btuart_close(info);
pcmcia_disable_device(link->handle);
pcmcia_disable_device(link);
}
static struct pcmcia_device_id btuart_ids[] = {
......
......@@ -87,8 +87,8 @@ typedef struct dtl1_info_t {
} dtl1_info_t;
static void dtl1_config(dev_link_t *link);
static void dtl1_release(dev_link_t *link);
static void dtl1_config(struct pcmcia_device *link);
static void dtl1_release(struct pcmcia_device *link);
static void dtl1_detach(struct pcmcia_device *p_dev);
......@@ -555,17 +555,16 @@ static int dtl1_close(dtl1_info_t *info)
return 0;
}
static int dtl1_attach(struct pcmcia_device *p_dev)
static int dtl1_attach(struct pcmcia_device *link)
{
dtl1_info_t *info;
dev_link_t *link = dev_to_instance(p_dev);
/* Create new info device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
info->p_dev = p_dev;
info->p_dev = link;
link->priv = info;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
......@@ -586,9 +585,8 @@ static int dtl1_attach(struct pcmcia_device *p_dev)
}
static void dtl1_detach(struct pcmcia_device *p_dev)
static void dtl1_detach(struct pcmcia_device *link)
{
dev_link_t *link = dev_to_instance(p_dev);
dtl1_info_t *info = link->priv;
if (link->state & DEV_CONFIG)
......@@ -597,7 +595,7 @@ static void dtl1_detach(struct pcmcia_device *p_dev)
kfree(info);
}
static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int get_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
int i;
......@@ -608,23 +606,22 @@ static int get_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
return pcmcia_parse_tuple(handle, tuple, parse);
}
static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
if (pcmcia_get_first_tuple(handle, tuple) != CS_SUCCESS)
return CS_NO_MORE_ITEMS;
return get_tuple(handle, tuple, parse);
}
static int next_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
{
if (pcmcia_get_next_tuple(handle, tuple) != CS_SUCCESS)
return CS_NO_MORE_ITEMS;
return get_tuple(handle, tuple, parse);
}
static void dtl1_config(dev_link_t *link)
static void dtl1_config(struct pcmcia_device *link)
{
client_handle_t handle = link->handle;
dtl1_info_t *info = link->priv;
tuple_t tuple;
u_short buf[256];
......@@ -639,7 +636,7 @@ static void dtl1_config(dev_link_t *link)
/* Get configuration register information */
tuple.DesiredTuple = CISTPL_CONFIG;
last_ret = first_tuple(handle, &tuple, &parse);
last_ret = first_tuple(link, &tuple, &parse);
if (last_ret != CS_SUCCESS) {
last_fn = ParseTuple;
goto cs_failed;
......@@ -658,34 +655,34 @@ static void dtl1_config(dev_link_t *link)
/* Look for a generic full-sized window */
link->io.NumPorts1 = 8;
i = first_tuple(handle, &tuple, &parse);
i = first_tuple(link, &tuple, &parse);
while (i != CS_NO_MORE_ITEMS) {
if ((i == CS_SUCCESS) && (cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
link->conf.ConfigIndex = cf->index;
link->io.BasePort1 = cf->io.win[0].base;
link->io.NumPorts1 = cf->io.win[0].len; /*yo */
link->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
i = pcmcia_request_io(link->handle, &link->io);
i = pcmcia_request_io(link, &link->io);
if (i == CS_SUCCESS)
break;
}
i = next_tuple(handle, &tuple, &parse);
i = next_tuple(link, &tuple, &parse);
}
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIO, i);
cs_error(link, RequestIO, i);
goto failed;
}
i = pcmcia_request_irq(link->handle, &link->irq);
i = pcmcia_request_irq(link, &link->irq);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIRQ, i);
cs_error(link, RequestIRQ, i);
link->irq.AssignedIRQ = 0;
}
i = pcmcia_request_configuration(link->handle, &link->conf);
i = pcmcia_request_configuration(link, &link->conf);
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestConfiguration, i);
cs_error(link, RequestConfiguration, i);
goto failed;
}
......@@ -699,21 +696,21 @@ static void dtl1_config(dev_link_t *link)
return;
cs_failed:
cs_error(link->handle, last_fn, last_ret);
cs_error(link, last_fn, last_ret);
failed:
dtl1_release(link);
}
static void dtl1_release(dev_link_t *link)
static void dtl1_release(struct pcmcia_device *link)
{
dtl1_info_t *info = link->priv;
if (link->state & DEV_PRESENT)
dtl1_close(info);
pcmcia_disable_device(link->handle);
pcmcia_disable_device(link);
}
......
......@@ -67,7 +67,7 @@ static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";
#define T_100MSEC msecs_to_jiffies(100)
#define T_500MSEC msecs_to_jiffies(500)
static void cm4000_release(dev_link_t *link);
static void cm4000_release(struct pcmcia_device *link);
static int major; /* major number we get from the kernel */
......@@ -149,14 +149,14 @@ struct cm4000_dev {
#define ZERO_DEV(dev) \
memset(&dev->atr_csum,0, \
sizeof(struct cm4000_dev) - \
/*link*/ sizeof(dev_link_t) - \
/*link*/ sizeof(struct pcmcia_device) - \
/*node*/ sizeof(dev_node_t) - \
/*atr*/ MAX_ATR*sizeof(char) - \
/*rbuf*/ 512*sizeof(char) - \
/*sbuf*/ 512*sizeof(char) - \
/*queue*/ 4*sizeof(wait_queue_head_t))
static dev_link_t *dev_table[CM4000_MAX_DEV];
static struct pcmcia_device *dev_table[CM4000_MAX_DEV];
static struct class *cmm_class;
/* This table doesn't use spaces after the comma between fields and thus
......@@ -1441,7 +1441,7 @@ static int cmm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
{
struct cm4000_dev *dev = filp->private_data;
ioaddr_t iobase = dev->p_dev->io.BasePort1;
dev_link_t *link;
struct pcmcia_device *link;
int size;
int rc;
void __user *argp = (void __user *)arg;
......@@ -1660,7 +1660,7 @@ static int cmm_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
static int cmm_open(struct inode *inode, struct file *filp)
{
struct cm4000_dev *dev;
dev_link_t *link;
struct pcmcia_device *link;
int rc, minor = iminor(inode);
if (minor >= CM4000_MAX_DEV)
......@@ -1709,7 +1709,7 @@ static int cmm_open(struct inode *inode, struct file *filp)
static int cmm_close(struct inode *inode, struct file *filp)
{
struct cm4000_dev *dev;
dev_link_t *link;
struct pcmcia_device *link;
int minor = iminor(inode);
if (minor >= CM4000_MAX_DEV)
......@@ -1735,7 +1735,7 @@ static int cmm_close(struct inode *inode, struct file *filp)
return 0;
}
static void cmm_cm4000_release(dev_link_t * link)
static void cmm_cm4000_release(struct pcmcia_device * link)
{
struct cm4000_dev *dev = link->priv;
......@@ -1759,9 +1759,8 @@ static void cmm_cm4000_release(dev_link_t * link)
/*==== Interface to PCMCIA Layer =======================================*/
static void cm4000_config(dev_link_t * link, int devno)
static void cm4000_config(struct pcmcia_device * link, int devno)
{
client_handle_t handle = link->handle;
struct cm4000_dev *dev;
tuple_t tuple;
cisparse_t parse;
......@@ -1776,16 +1775,16 @@ static void cm4000_config(dev_link_t * link, int devno)
tuple.TupleDataMax = sizeof(buf);