[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] linux: remove sysfs files during balloon module exit



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227525200 0
# Node ID 163a3807cb1fb4f35304a99c63f4deac322df2da
# Parent  412b24a36929b7cbedc793b4aad06b334bea021b
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@xxxxxxxxxx>
---
 drivers/xen/balloon/balloon.c |    4 ++--
 drivers/xen/balloon/sysfs.c   |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff -r 412b24a36929 -r 163a3807cb1f drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c     Mon Nov 24 11:04:54 2008 +0000
+++ b/drivers/xen/balloon/balloon.c     Mon Nov 24 11:13:20 2008 +0000
@@ -577,8 +577,8 @@ subsys_initcall(balloon_init);
 
 static void __exit balloon_exit(void)
 {
-    /* XXX - release balloon here */
-    return; 
+       balloon_sysfs_exit();
+       /* XXX - release balloon here */
 }
 
 module_exit(balloon_exit); 
diff -r 412b24a36929 -r 163a3807cb1f drivers/xen/balloon/sysfs.c
--- a/drivers/xen/balloon/sysfs.c       Mon Nov 24 11:04:54 2008 +0000
+++ b/drivers/xen/balloon/sysfs.c       Mon Nov 24 11:13:20 2008 +0000
@@ -111,7 +111,7 @@ static struct sysdev_class balloon_sysde
 
 static struct sys_device balloon_sysdev;
 
-static int register_balloon(struct sys_device *sysdev)
+static int __init register_balloon(struct sys_device *sysdev)
 {
        int i, error;
 
@@ -148,7 +148,7 @@ static int register_balloon(struct sys_d
        return error;
 }
 
-static void unregister_balloon(struct sys_device *sysdev)
+static __exit void unregister_balloon(struct sys_device *sysdev)
 {
        int i;
 
@@ -159,12 +159,12 @@ static void unregister_balloon(struct sy
        sysdev_class_unregister(&balloon_sysdev_class);
 }
 
-int balloon_sysfs_init(void)
+int __init balloon_sysfs_init(void)
 {
        return register_balloon(&balloon_sysdev);
 }
 
-void balloon_sysfs_exit(void)
+void __exit balloon_sysfs_exit(void)
 {
        unregister_balloon(&balloon_sysdev);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.