aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/rsrc_mgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/rsrc_mgr.c')
-rw-r--r--drivers/pcmcia/rsrc_mgr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index 52db17263d8b..f92a2dac13a2 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -114,22 +114,20 @@ struct pcmcia_align_data {
114 unsigned long offset; 114 unsigned long offset;
115}; 115};
116 116
117static void pcmcia_align(void *align_data, struct resource *res, 117static resource_size_t pcmcia_align(void *align_data, struct resource *res,
118 unsigned long size, unsigned long align) 118 resource_size_t size, resource_size_t align)
119{ 119{
120 struct pcmcia_align_data *data = align_data; 120 struct pcmcia_align_data *data = align_data;
121 unsigned long start; 121 resource_size_t start;
122 122
123 start = (res->start & ~data->mask) + data->offset; 123 start = (res->start & ~data->mask) + data->offset;
124 if (start < res->start) 124 if (start < res->start)
125 start += data->mask + 1; 125 start += data->mask + 1;
126 res->start = start;
127 126
128#ifdef CONFIG_X86 127#ifdef CONFIG_X86
129 if (res->flags & IORESOURCE_IO) { 128 if (res->flags & IORESOURCE_IO) {
130 if (start & 0x300) { 129 if (start & 0x300) {
131 start = (start + 0x3ff) & ~0x3ff; 130 start = (start + 0x3ff) & ~0x3ff;
132 res->start = start;
133 } 131 }
134 } 132 }
135#endif 133#endif
@@ -137,9 +135,11 @@ static void pcmcia_align(void *align_data, struct resource *res,
137#ifdef CONFIG_M68K 135#ifdef CONFIG_M68K
138 if (res->flags & IORESOURCE_IO) { 136 if (res->flags & IORESOURCE_IO) {
139 if ((res->start + size - 1) >= 1024) 137 if ((res->start + size - 1) >= 1024)
140 res->start = res->end; 138 start = res->end;
141 } 139 }
142#endif 140#endif
141
142 return start;
143} 143}
144 144
145 145