提交 f5560da5 编写于 作者: M Magnus Damm 提交者: Dominik Brodowski

pcmcia: Pass struct pcmcia_device to pcmcia_release_window()

No logic changes, just pass struct pcmcia_device to pcmcia_release_window().

[linux@dominikbrodowski.net: update to 2.6.31]
CC: netdev@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 78a14e27
......@@ -168,15 +168,15 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
return 0;
exit3:
pcmcia_release_window(ipw->handle_attr_memory);
pcmcia_release_window(p_dev, ipw->handle_attr_memory);
exit2:
if (ipw->common_memory) {
release_mem_region(ipw->request_common_memory.Base,
ipw->request_common_memory.Size);
iounmap(ipw->common_memory);
pcmcia_release_window(ipw->handle_common_memory);
pcmcia_release_window(p_dev, ipw->handle_common_memory);
} else
pcmcia_release_window(ipw->handle_common_memory);
pcmcia_release_window(p_dev, ipw->handle_common_memory);
exit1:
release_resource(io_resource);
pcmcia_disable_device(p_dev);
......@@ -260,13 +260,13 @@ static int config_ipwireless(struct ipw_dev *ipw)
release_mem_region(ipw->request_attr_memory.Base,
ipw->request_attr_memory.Size);
iounmap(ipw->attr_memory);
pcmcia_release_window(ipw->handle_attr_memory);
pcmcia_release_window(link, ipw->handle_attr_memory);
}
if (ipw->common_memory) {
release_mem_region(ipw->request_common_memory.Base,
ipw->request_common_memory.Size);
iounmap(ipw->common_memory);
pcmcia_release_window(ipw->handle_common_memory);
pcmcia_release_window(link, ipw->handle_common_memory);
}
pcmcia_disable_device(link);
return -1;
......@@ -287,9 +287,9 @@ static void release_ipwireless(struct ipw_dev *ipw)
iounmap(ipw->attr_memory);
}
if (ipw->common_memory)
pcmcia_release_window(ipw->handle_common_memory);
pcmcia_release_window(ipw->link, ipw->handle_common_memory);
if (ipw->attr_memory)
pcmcia_release_window(ipw->handle_attr_memory);
pcmcia_release_window(ipw->link, ipw->handle_attr_memory);
/* Break the link with Card Services */
pcmcia_disable_device(ipw->link);
......
......@@ -344,7 +344,7 @@ static void pcmciamtd_release(struct pcmcia_device *link)
iounmap(dev->win_base);
dev->win_base = NULL;
}
pcmcia_release_window(link->win);
pcmcia_release_window(link, link->win);
}
pcmcia_disable_device(link);
}
......
......@@ -599,7 +599,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)
}
iounmap(base);
j = pcmcia_release_window(link->win);
j = pcmcia_release_window(link, link->win);
return (i != 0x200) ? 0 : -1;
} /* fmvj18x_get_hwinfo */
......@@ -666,7 +666,7 @@ static void fmvj18x_release(struct pcmcia_device *link)
tmp = lp->base;
lp->base = NULL; /* set NULL before iounmap */
iounmap(tmp);
j = pcmcia_release_window(link->win);
j = pcmcia_release_window(link, link->win);
}
pcmcia_disable_device(link);
......
......@@ -328,7 +328,7 @@ static void ibmtr_release(struct pcmcia_device *link)
if (link->win) {
struct tok_info *ti = netdev_priv(dev);
iounmap(ti->mmio);
pcmcia_release_window(info->sram_win_handle);
pcmcia_release_window(link, info->sram_win_handle);
}
pcmcia_disable_device(link);
}
......
......@@ -337,7 +337,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link)
}
iounmap(virt);
j = pcmcia_release_window(link->win);
j = pcmcia_release_window(link, link->win);
return (i < NR_INFO) ? hw_info+i : NULL;
} /* get_hwinfo */
......@@ -1513,7 +1513,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
pcnet_reset_8390(dev);
if (i != (TX_PAGES<<8)) {
iounmap(info->base);
pcmcia_release_window(link->win);
pcmcia_release_window(link, link->win);
info->base = NULL; link->win = NULL;
goto failed;
}
......
......@@ -820,10 +820,10 @@ static void ray_release(struct pcmcia_device *link)
iounmap(local->rmem);
iounmap(local->amem);
/* Do bother checking to see if these succeed or not */
i = pcmcia_release_window(local->amem_handle);
i = pcmcia_release_window(link, local->amem_handle);
if (i != 0)
dev_dbg(&link->dev, "ReleaseWindow(local->amem) ret = %x\n", i);
i = pcmcia_release_window(local->rmem_handle);
i = pcmcia_release_window(link, local->rmem_handle);
if (i != 0)
dev_dbg(&link->dev, "ReleaseWindow(local->rmem) ret = %x\n", i);
pcmcia_disable_device(link);
......
......@@ -442,9 +442,10 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
} /* pcmcia_release_irq */
int pcmcia_release_window(window_handle_t win)
int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh)
{
struct pcmcia_socket *s;
window_handle_t win = wh;
if ((win == NULL) || (win->magic != WINDOW_MAGIC))
return -EINVAL;
......@@ -891,7 +892,7 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) {
pcmcia_release_io(p_dev, &p_dev->io);
pcmcia_release_irq(p_dev, &p_dev->irq);
if (p_dev->win)
pcmcia_release_window(p_dev->win);
pcmcia_release_window(p_dev, p_dev->win);
}
EXPORT_SYMBOL(pcmcia_disable_device);
......
......@@ -201,7 +201,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req,
window_handle_t *wh);
int pcmcia_release_window(window_handle_t win);
int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t win);
int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册