ia64/linux-2.6.18-xen.hg

changeset 737:163a3807cb1f

linux: remove sysfs files during balloon module exit

Relevant when building pv drivers.

Also adjust some section attributes of the sysfs code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Nov 24 11:13:20 2008 +0000 (2008-11-24)
parents 412b24a36929
children 1b68d09b868f
files drivers/xen/balloon/balloon.c drivers/xen/balloon/sysfs.c
line diff
     1.1 --- a/drivers/xen/balloon/balloon.c	Mon Nov 24 11:04:54 2008 +0000
     1.2 +++ b/drivers/xen/balloon/balloon.c	Mon Nov 24 11:13:20 2008 +0000
     1.3 @@ -577,8 +577,8 @@ subsys_initcall(balloon_init);
     1.4  
     1.5  static void __exit balloon_exit(void)
     1.6  {
     1.7 -    /* XXX - release balloon here */
     1.8 -    return; 
     1.9 +	balloon_sysfs_exit();
    1.10 +	/* XXX - release balloon here */
    1.11  }
    1.12  
    1.13  module_exit(balloon_exit); 
     2.1 --- a/drivers/xen/balloon/sysfs.c	Mon Nov 24 11:04:54 2008 +0000
     2.2 +++ b/drivers/xen/balloon/sysfs.c	Mon Nov 24 11:13:20 2008 +0000
     2.3 @@ -111,7 +111,7 @@ static struct sysdev_class balloon_sysde
     2.4  
     2.5  static struct sys_device balloon_sysdev;
     2.6  
     2.7 -static int register_balloon(struct sys_device *sysdev)
     2.8 +static int __init register_balloon(struct sys_device *sysdev)
     2.9  {
    2.10  	int i, error;
    2.11  
    2.12 @@ -148,7 +148,7 @@ static int register_balloon(struct sys_d
    2.13  	return error;
    2.14  }
    2.15  
    2.16 -static void unregister_balloon(struct sys_device *sysdev)
    2.17 +static __exit void unregister_balloon(struct sys_device *sysdev)
    2.18  {
    2.19  	int i;
    2.20  
    2.21 @@ -159,12 +159,12 @@ static void unregister_balloon(struct sy
    2.22  	sysdev_class_unregister(&balloon_sysdev_class);
    2.23  }
    2.24  
    2.25 -int balloon_sysfs_init(void)
    2.26 +int __init balloon_sysfs_init(void)
    2.27  {
    2.28  	return register_balloon(&balloon_sysdev);
    2.29  }
    2.30  
    2.31 -void balloon_sysfs_exit(void)
    2.32 +void __exit balloon_sysfs_exit(void)
    2.33  {
    2.34  	unregister_balloon(&balloon_sysdev);
    2.35  }