]> bbs.cooldavid.org Git - net-next-2.6.git/blame - drivers/pcmcia/rsrc_mgr.c
pcmcia: move all pcmcia_resource_ops providers into one module
[net-next-2.6.git] / drivers / pcmcia / rsrc_mgr.c
CommitLineData
1da177e4
LT
1/*
2 * rsrc_mgr.c -- Resource management routines and/or wrappers
3 *
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.
7 *
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.
11 *
12 * (C) 1999 David A. Hinds
13 */
14
5a0e3ad6 15#include <linux/slab.h>
1da177e4
LT
16#include <linux/module.h>
17#include <linux/kernel.h>
18
19#include <pcmcia/cs_types.h>
20#include <pcmcia/ss.h>
21#include <pcmcia/cs.h>
91284224 22#include <pcmcia/cistpl.h>
1da177e4
LT
23#include "cs_internal.h"
24
49b1153a 25int static_init(struct pcmcia_socket *s)
1da177e4 26{
1da177e4
LT
27 /* the good thing about SS_CAP_STATIC_MAP sockets is
28 * that they don't need a resource database */
29
1da177e4 30 s->resource_setup_done = 1;
1da177e4
LT
31
32 return 0;
33}
34
49b1153a
DB
35struct resource *pcmcia_make_resource(unsigned long start, unsigned long end,
36 int flags, const char *name)
3b27e942
DB
37{
38 struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
39
40 if (res) {
41 res->name = name;
49b1153a
DB
42 res->start = start;
43 res->end = start + end - 1;
3b27e942
DB
44 res->flags = flags;
45 }
46 return res;
47}
48
3b27e942 49
49b1153a 50struct pccard_resource_ops pccard_static_ops = {
3b27e942 51 .validate_mem = NULL,
49b1153a
DB
52 .adjust_io_region = NULL,
53 .find_io = NULL,
3b27e942 54 .find_mem = NULL,
c5023801
DB
55 .add_io = NULL,
56 .add_mem = NULL,
3b27e942
DB
57 .init = static_init,
58 .exit = NULL,
59};
49b1153a
DB
60EXPORT_SYMBOL(pccard_static_ops);
61
3b27e942 62
49b1153a
DB
63MODULE_AUTHOR("David A. Hinds, Dominik Brodowski");
64MODULE_LICENSE("GPL");
65MODULE_ALIAS("rsrc_nonstatic");