diff -r d49bc30b6b27 -r e1df81251b97 linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c --- a/linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c Fri Aug 18 16:26:39 2006 -0400 +++ b/linux-2.6-xen-sparse/drivers/xen/xenfb/xenfb.c Fri Aug 18 16:29:50 2006 -0400 @@ -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) diff -r d49bc30b6b27 -r e1df81251b97 linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c --- a/linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c Fri Aug 18 16:26:39 2006 -0400 +++ b/linux-2.6-xen-sparse/drivers/xen/xenkbd/xenkbd.c Fri Aug 18 16:29:50 2006 -0400 @@ -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();