ia64/xen-unstable

changeset 2580:fa14084f05cc

bitkeeper revision 1.1159.1.195 (415ca61bv5y6opiJRoJ_c07c3vTfDA)

Make console driver play nice with sysfs. Should work with udev now.
author mwilli2@equilibrium.research
date Fri Oct 01 00:34:35 2004 +0000 (2004-10-01)
parents e11b33725e77
children 86f3590030af
files linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c	Thu Sep 30 21:14:46 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c	Fri Oct 01 00:34:35 2004 +0000
     1.3 @@ -666,11 +666,13 @@ static int __init xencons_init(void)
     1.4      {
     1.5          DRV(xencons_driver)->name        = "ttyS";
     1.6          DRV(xencons_driver)->minor_start = 64;
     1.7 +	DRV(xencons_driver)->name_base   = 0;
     1.8      }
     1.9      else
    1.10      {
    1.11          DRV(xencons_driver)->name        = "tty";
    1.12          DRV(xencons_driver)->minor_start = 1;
    1.13 +	DRV(xencons_driver)->name_base   = 1;
    1.14      }
    1.15  
    1.16  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    1.17 @@ -694,6 +696,10 @@ static int __init xencons_init(void)
    1.18          panic("Couldn't register Xen virtual console driver as %s\n",
    1.19                DRV(xencons_driver)->name);
    1.20  
    1.21 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    1.22 +    tty_register_device(xencons_driver, 0, NULL);
    1.23 +#endif
    1.24 +
    1.25      if ( start_info.flags & SIF_INITDOMAIN )
    1.26      {
    1.27          xencons_priv_irq = bind_virq_to_irq(VIRQ_CONSOLE);
    1.28 @@ -715,6 +721,10 @@ static void __exit xencons_fini(void)
    1.29  {
    1.30      int ret;
    1.31  
    1.32 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    1.33 +    tty_unregister_device(xencons_driver, 0);
    1.34 +#endif
    1.35 +
    1.36      if ( (ret = tty_unregister_driver(DRV(xencons_driver))) != 0 )
    1.37          printk(KERN_ERR "Unable to unregister Xen console driver: %d\n", ret);
    1.38