GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / pcmcia / rsrc_mgr.c
blob4e80421fd9084d02433aea7f1c0561edcd2c6192
1 /*
2 * rsrc_mgr.c -- Resource management routines and/or wrappers
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * The initial developer of the original code is David A. Hinds
9 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
10 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
12 * (C) 1999 David A. Hinds
15 #include <linux/slab.h>
16 #include <linux/module.h>
17 #include <linux/kernel.h>
19 #include <pcmcia/ss.h>
20 #include <pcmcia/cs.h>
21 #include <pcmcia/cistpl.h>
22 #include "cs_internal.h"
24 int static_init(struct pcmcia_socket *s)
26 /* the good thing about SS_CAP_STATIC_MAP sockets is
27 * that they don't need a resource database */
29 s->resource_setup_done = 1;
31 return 0;
34 struct resource *pcmcia_make_resource(unsigned long start, unsigned long end,
35 int flags, const char *name)
37 struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
39 if (res) {
40 res->name = name;
41 res->start = start;
42 res->end = start + end - 1;
43 res->flags = flags;
45 return res;
48 static int static_find_io(struct pcmcia_socket *s, unsigned int attr,
49 unsigned int *base, unsigned int num,
50 unsigned int align, struct resource **parent)
52 if (!s->io_offset)
53 return -EINVAL;
54 *base = s->io_offset | (*base & 0x0fff);
55 *parent = NULL;
57 return 0;
61 struct pccard_resource_ops pccard_static_ops = {
62 .validate_mem = NULL,
63 .find_io = static_find_io,
64 .find_mem = NULL,
65 .init = static_init,
66 .exit = NULL,
68 EXPORT_SYMBOL(pccard_static_ops);
71 MODULE_AUTHOR("David A. Hinds, Dominik Brodowski");
72 MODULE_LICENSE("GPL");
73 MODULE_ALIAS("rsrc_nonstatic");