aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_nonstatic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/rsrc_nonstatic.c')
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 4663b3fa9f96..2e47991eccf6 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -810,6 +810,13 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long
810 unsigned long size = end - start + 1; 810 unsigned long size = end - start + 1;
811 int ret = 0; 811 int ret = 0;
812 812
813#if defined(CONFIG_X86)
814 /* on x86, avoid anything < 0x100 for it is often used for
815 * legacy platform devices */
816 if (start < 0x100)
817 start = 0x100;
818#endif
819
813 if (end < start) 820 if (end < start)
814 return -EINVAL; 821 return -EINVAL;
815 822
@@ -867,10 +874,8 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
867 if (res == &ioport_resource) 874 if (res == &ioport_resource)
868 continue; 875 continue;
869 dev_printk(KERN_INFO, &s->cb_dev->dev, 876 dev_printk(KERN_INFO, &s->cb_dev->dev,
870 "pcmcia: parent PCI bridge I/O " 877 "pcmcia: parent PCI bridge window: %pR\n",
871 "window: 0x%llx - 0x%llx\n", 878 res);
872 (unsigned long long)res->start,
873 (unsigned long long)res->end);
874 if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end)) 879 if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end))
875 done |= IORESOURCE_IO; 880 done |= IORESOURCE_IO;
876 881
@@ -880,10 +885,8 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s)
880 if (res == &iomem_resource) 885 if (res == &iomem_resource)
881 continue; 886 continue;
882 dev_printk(KERN_INFO, &s->cb_dev->dev, 887 dev_printk(KERN_INFO, &s->cb_dev->dev,
883 "pcmcia: parent PCI bridge Memory " 888 "pcmcia: parent PCI bridge window: %pR\n",
884 "window: 0x%llx - 0x%llx\n", 889 res);
885 (unsigned long long)res->start,
886 (unsigned long long)res->end);
887 if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end)) 890 if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end))
888 done |= IORESOURCE_MEM; 891 done |= IORESOURCE_MEM;
889 } 892 }