ia64/xen-unstable

changeset 3467:310be512c8e3

bitkeeper revision 1.1159.223.6 (41ee77cbILw-JaVF0uno2Fd5_A-GiQ)

Fix error path in console-driver initilaisation. Remove module
destructor as the console driver cannot be built as a module.
author kaf24@scramble.cl.cam.ac.uk
date Wed Jan 19 15:07:55 2005 +0000 (2005-01-19)
parents af362b7301a0
children 50402a6cc3d8 bf476d24f798
files linux-2.6.10-xen-sparse/drivers/xen/console/console.c
line diff
     1.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/console/console.c	Wed Jan 19 14:03:33 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/console/console.c	Wed Jan 19 15:07:55 2005 +0000
     1.3 @@ -738,8 +738,13 @@ static int __init xencons_init(void)
     1.4  
     1.5      if ( (rc = tty_register_driver(DRV(xencons_driver))) != 0 )
     1.6      {
     1.7 -        printk("Couldn't register Xen virtual console driver as %s\n",
     1.8 -               DRV(xencons_driver)->name);
     1.9 +        printk("WARNING: Failed to register Xen virtual "
    1.10 +               "console driver as '%s%d'\n",
    1.11 +               DRV(xencons_driver)->name, DRV(xencons_driver)->name_base);
    1.12 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    1.13 +        put_tty_driver(xencons_driver);
    1.14 +        xencons_driver = NULL;
    1.15 +#endif
    1.16          return rc;
    1.17      }
    1.18  
    1.19 @@ -764,27 +769,4 @@ static int __init xencons_init(void)
    1.20      return 0;
    1.21  }
    1.22  
    1.23 -static void __exit xencons_fini(void)
    1.24 -{
    1.25 -    int ret;
    1.26 -
    1.27 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
    1.28 -    tty_unregister_device(xencons_driver, 0);
    1.29 -#endif
    1.30 -
    1.31 -    if ( (ret = tty_unregister_driver(DRV(xencons_driver))) != 0 )
    1.32 -        printk(KERN_ERR "Unable to unregister Xen console driver: %d\n", ret);
    1.33 -
    1.34 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
    1.35 -    {
    1.36 -        free_irq(xencons_priv_irq, NULL);
    1.37 -        unbind_virq_from_irq(VIRQ_CONSOLE);
    1.38 -    }
    1.39 -    else
    1.40 -    {
    1.41 -        ctrl_if_unregister_receiver(CMSG_CONSOLE, xencons_rx);
    1.42 -    }
    1.43 -}
    1.44 -
    1.45  module_init(xencons_init);
    1.46 -module_exit(xencons_fini);