diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-06-19 13:02:52 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2008-06-24 09:33:42 -0400 |
commit | c502380170ee93fd1f4028cc1f32efc87fde7376 (patch) | |
tree | 3743249953d40aa0f08cc9ae4f7774c8907b3326 /drivers/pcmcia/rsrc_nonstatic.c | |
parent | 635416ef393e8cec5a89fc6c1de710ee9596a51e (diff) |
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 | |||
766 | } | 766 | } |
767 | 767 | ||
768 | 768 | ||
769 | static int nonstatic_adjust_resource_info(struct pcmcia_socket *s, adjust_t *adj) | ||
770 | { | ||
771 | unsigned long end; | ||
772 | |||
773 | switch (adj->Resource) { | ||
774 | case RES_MEMORY_RANGE: | ||
775 | end = adj->resource.memory.Base + adj->resource.memory.Size - 1; | ||
776 | return adjust_memory(s, adj->Action, adj->resource.memory.Base, end); | ||
777 | case RES_IO_RANGE: | ||
778 | end = adj->resource.io.BasePort + adj->resource.io.NumPorts - 1; | ||
779 | return adjust_io(s, adj->Action, adj->resource.io.BasePort, end); | ||
780 | } | ||
781 | return CS_UNSUPPORTED_FUNCTION; | ||
782 | } | ||
783 | |||
784 | #ifdef CONFIG_PCI | 769 | #ifdef CONFIG_PCI |
785 | static int nonstatic_autoadd_resources(struct pcmcia_socket *s) | 770 | static int nonstatic_autoadd_resources(struct pcmcia_socket *s) |
786 | { | 771 | { |
@@ -889,7 +874,8 @@ struct pccard_resource_ops pccard_nonstatic_ops = { | |||
889 | .adjust_io_region = nonstatic_adjust_io_region, | 874 | .adjust_io_region = nonstatic_adjust_io_region, |
890 | .find_io = nonstatic_find_io_region, | 875 | .find_io = nonstatic_find_io_region, |
891 | .find_mem = nonstatic_find_mem_region, | 876 | .find_mem = nonstatic_find_mem_region, |
892 | .adjust_resource = nonstatic_adjust_resource_info, | 877 | .add_io = adjust_io, |
878 | .add_mem = adjust_memory, | ||
893 | .init = nonstatic_init, | 879 | .init = nonstatic_init, |
894 | .exit = nonstatic_release_resource_db, | 880 | .exit = nonstatic_release_resource_db, |
895 | }; | 881 | }; |