diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-02 19:05:33 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-11-28 12:02:51 -0500 |
commit | d7b0364bfc71c4abc97dfc47f85bb32363266e4e (patch) | |
tree | 063158e0ecdb2c4acd9ade051e21f10ff93d6eee /drivers/pcmcia/pcmcia_resource.c | |
parent | 0bdf9b3dd3cfa5cbd5d55172c19f5dd166208e17 (diff) |
pcmcia: move some window-related code to pcmcia_ioctl.c
pcmcia_get_window() and pcmcia_get_mem_page() were only called from
pcmcia_ioctl.c. Therefore, move these functions to that file, and
remove the useless EXPORTs.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index ae6abc7833d4..ae68b26a7050 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -185,63 +185,6 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, | |||
185 | EXPORT_SYMBOL(pcmcia_access_configuration_register); | 185 | EXPORT_SYMBOL(pcmcia_access_configuration_register); |
186 | 186 | ||
187 | 187 | ||
188 | /** pcmcia_get_window | ||
189 | */ | ||
190 | int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out, | ||
191 | window_handle_t wh, win_req_t *req) | ||
192 | { | ||
193 | window_t *win; | ||
194 | window_handle_t w; | ||
195 | |||
196 | if (!s || !(s->state & SOCKET_PRESENT)) | ||
197 | return -ENODEV; | ||
198 | |||
199 | wh--; | ||
200 | if (wh >= MAX_WIN) | ||
201 | return -EINVAL; | ||
202 | for (w = wh; w < MAX_WIN; w++) | ||
203 | if (s->state & SOCKET_WIN_REQ(w)) | ||
204 | break; | ||
205 | if (w == MAX_WIN) | ||
206 | return -EINVAL; | ||
207 | win = &s->win[w]; | ||
208 | req->Base = win->ctl.res->start; | ||
209 | req->Size = win->ctl.res->end - win->ctl.res->start + 1; | ||
210 | req->AccessSpeed = win->ctl.speed; | ||
211 | req->Attributes = 0; | ||
212 | if (win->ctl.flags & MAP_ATTRIB) | ||
213 | req->Attributes |= WIN_MEMORY_TYPE_AM; | ||
214 | if (win->ctl.flags & MAP_ACTIVE) | ||
215 | req->Attributes |= WIN_ENABLE; | ||
216 | if (win->ctl.flags & MAP_16BIT) | ||
217 | req->Attributes |= WIN_DATA_WIDTH_16; | ||
218 | if (win->ctl.flags & MAP_USE_WAIT) | ||
219 | req->Attributes |= WIN_USE_WAIT; | ||
220 | |||
221 | *wh_out = w++; | ||
222 | return 0; | ||
223 | } /* pcmcia_get_window */ | ||
224 | EXPORT_SYMBOL(pcmcia_get_window); | ||
225 | |||
226 | |||
227 | /** pcmcia_get_mem_page | ||
228 | * | ||
229 | * Change the card address of an already open memory window. | ||
230 | */ | ||
231 | int pcmcia_get_mem_page(struct pcmcia_socket *skt, window_handle_t wh, | ||
232 | memreq_t *req) | ||
233 | { | ||
234 | wh--; | ||
235 | if (wh >= MAX_WIN) | ||
236 | return -EINVAL; | ||
237 | |||
238 | req->Page = 0; | ||
239 | req->CardOffset = skt->win[wh].ctl.card_start; | ||
240 | return 0; | ||
241 | } /* pcmcia_get_mem_page */ | ||
242 | EXPORT_SYMBOL(pcmcia_get_mem_page); | ||
243 | |||
244 | |||
245 | int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh, | 188 | int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh, |
246 | memreq_t *req) | 189 | memreq_t *req) |
247 | { | 190 | { |