|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] linux: remove sysfs files during balloon module exit
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 <=
|
|
|
|
|