]> Git Repo - linux.git/blob - drivers/staging/unisys/channels/chanstub.c
selinux: Remove security_ops extern
[linux.git] / drivers / staging / unisys / channels / chanstub.c
1 /* Copyright (C) 2010 - 2013 UNISYS CORPORATION
2  * All rights reserved.
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 as published by
6  * the Free Software Foundation; either version 2 of the License, or (at
7  * your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12  * NON INFRINGEMENT.  See the GNU General Public License for more
13  * details.
14  */
15
16 #define EXPORT_SYMTAB
17 #include <linux/kernel.h>
18 #ifdef CONFIG_MODVERSIONS
19 #include <config/modversions.h>
20 #endif
21 #include <linux/module.h>
22 #include <linux/init.h>         /* for module_init and module_exit */
23 #include <linux/slab.h>         /* for memcpy */
24 #include <linux/types.h>
25
26 #include "channel.h"
27 #include "chanstub.h"
28 #include "timskmodutils.h"
29 #include "version.h"
30
31 static __init int
32 channel_mod_init(void)
33 {
34         if (!unisys_spar_platform)
35                 return -ENODEV;
36         return 0;
37 }
38
39 static __exit void
40 channel_mod_exit(void)
41 {
42 }
43
44 unsigned char
45 SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
46                       void *pSignal, spinlock_t *lock)
47 {
48         unsigned char result;
49         unsigned long flags;
50         spin_lock_irqsave(lock, flags);
51         result = visor_signal_insert(pChannel, Queue, pSignal);
52         spin_unlock_irqrestore(lock, flags);
53         return result;
54 }
55
56 unsigned char
57 SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
58                       void *pSignal, spinlock_t *lock)
59 {
60         unsigned char result;
61         spin_lock(lock);
62         result = visor_signal_remove(pChannel, Queue, pSignal);
63         spin_unlock(lock);
64         return result;
65 }
66
67 module_init(channel_mod_init);
68 module_exit(channel_mod_exit);
69
70 MODULE_LICENSE("GPL");
71 MODULE_AUTHOR("Bryan Glaudel");
72 MODULE_ALIAS("uischan");
73         /* this is extracted during depmod and kept in modules.dep */
This page took 0.042214 seconds and 4 git commands to generate.