Paravirt framebuffer not-used fixes [5/6]
PATCH 1/1 Paravirt framebuffer not-used fixes [5/6]
Don't initialize xenfb or xenkbd in dom0 or if our domain isn't set up to use a graphical console
Signed-off-by Jeremy Katz <[email protected]>
Jeremy
linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c +9 -0
@@ -369,6 +369,15 @@ static int __init xenfb_probe(void)struct fb_info *fb_info;struct evtchn_alloc_unbound alloc_unbound;struct xenbus_transaction xbt; + +/* Nothing to do if running in dom0. */ +if (is_initial_xendomain ()) +return -ENODEV ; +/* if we're not set up to use graphics mode, then don't initialize */ +if (xenbus_scanf (XBT_NIL ,"console" ,"use_graphics" ,"%d" , &ret) <0 ) +return -ENODEV ; +if (ret ==0 ) +return -ENODEV ; info =kmalloc (sizeof (*info),GFP_KERNEL );if (info ==NULL )
linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c +9 -0
@@ -80,6 +80,15 @@ int __init xenkbd_init(void)struct input_dev *input_dev;struct evtchn_alloc_unbound alloc_unbound;struct xenbus_transaction xbt; + +/* Nothing to do if running in dom0. */ +if (is_initial_xendomain ()) +return -ENODEV ; +/* if we're not set up to use graphics mode, then don't initialize */ +if (xenbus_scanf (XBT_NIL ,"console" ,"use_graphics" ,"%d" , &ret) <0 ) +return -ENODEV ; +if (ret ==0 ) +return -ENODEV ; dev =kmalloc (sizeof (*dev),GFP_KERNEL ); input_dev =input_allocate_device ();
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel