diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-06-19 21:02:52 +0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-06-24 17:33:42 +0400 |
commit | c502380170ee93fd1f4028cc1f32efc87fde7376 (patch) | |
tree | 3743249953d40aa0f08cc9ae4f7774c8907b3326 /drivers/pcmcia/rsrc_nonstatic.c | |
parent | 635416ef393e8cec5a89fc6c1de710ee9596a51e (diff) | |
download | linux-c502380170ee93fd1f4028cc1f32efc87fde7376.tar.xz |
pcmcia: carve out ioctl adjust function to pcmcia_ioctl
Let pcmcia_ioctl interact with rsrc_nonstatic using functions which
rsrc_nonstatic.c has to use anyway.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 4123155e2f7a..162693480ed0 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -766,21 +766,6 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long } -static int nonstatic_adjust_resource_info(struct pcmcia_socket *s, adjust_t *adj) -{ - unsigned long end; - - switch (adj->Resource) { - case RES_MEMORY_RANGE: - end = adj->resource.memory.Base + adj->resource.memory.Size - 1; - return adjust_memory(s, adj->Action, adj->resource.memory.Base, end); - case RES_IO_RANGE: - end = adj->resource.io.BasePort + adj->resource.io.NumPorts - 1; - return adjust_io(s, adj->Action, adj->resource.io.BasePort, end); - } - return CS_UNSUPPORTED_FUNCTION; -} - #ifdef CONFIG_PCI static int nonstatic_autoadd_resources(struct pcmcia_socket *s) { @@ -889,7 +874,8 @@ struct pccard_resource_ops pccard_nonstatic_ops = { .adjust_io_region = nonstatic_adjust_io_region, .find_io = nonstatic_find_io_region, .find_mem = nonstatic_find_mem_region, - .adjust_resource = nonstatic_adjust_resource_info, + .add_io = adjust_io, + .add_mem = adjust_memory, .init = nonstatic_init, .exit = nonstatic_release_resource_db, }; |