WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux: remove sysfs files during balloon module exit

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: remove sysfs files during balloon module exit
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 24 Nov 2008 11:03:18 +0000
Delivery-date: Mon, 24 Nov 2008 03:02:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Relevant when building pv drivers.

Also adjust some section attributes of the sysfs code.

As usual, written and tested on 2.6.27.6 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-11-20/drivers/xen/balloon/balloon.c
===================================================================
--- head-2008-11-20.orig/drivers/xen/balloon/balloon.c  2008-11-21 
16:00:42.000000000 +0100
+++ head-2008-11-20/drivers/xen/balloon/balloon.c       2008-11-21 
16:00:52.000000000 +0100
@@ -580,8 +580,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); 
Index: head-2008-11-20/drivers/xen/balloon/sysfs.c
===================================================================
--- head-2008-11-20.orig/drivers/xen/balloon/sysfs.c    2008-11-21 
15:55:35.000000000 +0100
+++ head-2008-11-20/drivers/xen/balloon/sysfs.c 2008-11-21 15:59:52.000000000 
+0100
@@ -118,7 +118,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;
 
@@ -155,7 +155,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;
 
@@ -166,12 +166,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux: remove sysfs files during balloon module exit, Jan Beulich <=