Commit a94dea81 authored by Russell King's avatar Russell King Committed by Linus Torvalds

[PATCH] Remove "fn" argument from read_cb_mem()

read_cb_mem is only ever called with its "fn" argument set to zero.
We therefore do not need to pass it.
parent cf506e2b
......@@ -175,8 +175,7 @@ static int cb_setup_cis_mem(socket_info_t * s, struct resource *res)
=====================================================================*/
int read_cb_mem(socket_info_t * s, u_char fn, int space,
u_int addr, u_int len, void *ptr)
int read_cb_mem(socket_info_t * s, int space, u_int addr, u_int len, void *ptr)
{
struct pci_dev *dev;
struct resource *res;
......@@ -186,7 +185,7 @@ int read_cb_mem(socket_info_t * s, u_char fn, int space,
if (!s->cb_config)
goto fail;
dev = &s->cb_config[fn].dev;
dev = &s->cb_config[0].dev;
/* Config space? */
if (space == 0) {
......
......@@ -327,7 +327,7 @@ static void read_cis_cache(socket_info_t *s, int attr, u_int addr,
}
#ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS)
ret = read_cb_mem(s, 0, attr, addr, len, ptr);
ret = read_cb_mem(s, attr, addr, len, ptr);
else
#endif
ret = read_cis_mem(s, attr, addr, len, ptr);
......@@ -358,7 +358,7 @@ int verify_cis_cache(socket_info_t *s)
for (i = 0; i < s->cis_used; i++) {
#ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS)
read_cb_mem(s, 0, s->cis_table[i].attr, s->cis_table[i].addr,
read_cb_mem(s, s->cis_table[i].attr, s->cis_table[i].addr,
s->cis_table[i].len, buf);
else
#endif
......
......@@ -200,8 +200,7 @@ int cb_alloc(socket_info_t *s);
void cb_free(socket_info_t *s);
void cb_enable(socket_info_t *s);
void cb_disable(socket_info_t *s);
int read_cb_mem(socket_info_t *s, u_char fn, int space,
u_int addr, u_int len, void *ptr);
int read_cb_mem(socket_info_t *s, int space, u_int addr, u_int len, void *ptr);
void cb_release_cis_mem(socket_info_t *s);
/* In cistpl.c */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment