File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 25
25
#include <xen/xenbus.h>
26
26
#include <xen/interface/io/pvcalls.h>
27
27
28
+ struct pvcalls_back_global {
29
+ struct list_head frontends ;
30
+ struct semaphore frontends_lock ;
31
+ } pvcalls_back_global ;
32
+
28
33
static int pvcalls_back_probe (struct xenbus_device * dev ,
29
34
const struct xenbus_device_id * id )
30
35
{
@@ -59,3 +64,20 @@ static struct xenbus_driver pvcalls_back_driver = {
59
64
.uevent = pvcalls_back_uevent ,
60
65
.otherend_changed = pvcalls_back_changed ,
61
66
};
67
+
68
+ static int __init pvcalls_back_init (void )
69
+ {
70
+ int ret ;
71
+
72
+ if (!xen_domain ())
73
+ return - ENODEV ;
74
+
75
+ ret = xenbus_register_backend (& pvcalls_back_driver );
76
+ if (ret < 0 )
77
+ return ret ;
78
+
79
+ sema_init (& pvcalls_back_global .frontends_lock , 1 );
80
+ INIT_LIST_HEAD (& pvcalls_back_global .frontends );
81
+ return 0 ;
82
+ }
83
+ module_init (pvcalls_back_init );
You can’t perform that action at this time.
0 commit comments