]>
Commit | Line | Data |
---|---|---|
cc90b958 BS |
1 | From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/163a3807cb1f |
2 | # HG changeset 735+738 patch | |
3 | # User Keir Fraser <keir.fraser@citrix.com> | |
4 | # Date 1227525200 0 | |
5 | # Node ID 163a3807cb1fb4f35304a99c63f4deac322df2da | |
6 | # Parent 412b24a36929b7cbedc793b4aad06b334bea021b | |
7 | Subject: linux: remove sysfs files during balloon module exit | |
8 | Patch-mainline: obsolete | |
9 | ||
10 | Relevant when building pv drivers. | |
11 | ||
12 | Also adjust some section attributes of the sysfs code. | |
13 | ||
14 | Signed-off-by: Jan Beulich <jbeulich@novell.com> | |
15 | ||
16 | From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/bf8b1ee634e2 | |
17 | balloon: Fix the build by including <linux/init.h> | |
18 | ||
19 | Signed-off-by: Keir Fraser <keir.fraser@citrix.com> | |
20 | ||
21 | Index: head-2008-11-25/drivers/xen/balloon/balloon.c | |
22 | =================================================================== | |
23 | --- head-2008-11-25.orig/drivers/xen/balloon/balloon.c 2008-07-21 11:00:33.000000000 +0200 | |
24 | +++ head-2008-11-25/drivers/xen/balloon/balloon.c 2008-11-25 13:31:07.000000000 +0100 | |
25 | @@ -577,8 +577,8 @@ subsys_initcall(balloon_init); | |
26 | ||
27 | static void __exit balloon_exit(void) | |
28 | { | |
29 | - /* XXX - release balloon here */ | |
30 | - return; | |
31 | + balloon_sysfs_exit(); | |
32 | + /* XXX - release balloon here */ | |
33 | } | |
34 | ||
35 | module_exit(balloon_exit); | |
36 | Index: head-2008-11-25/drivers/xen/balloon/sysfs.c | |
37 | =================================================================== | |
38 | --- head-2008-11-25.orig/drivers/xen/balloon/sysfs.c 2008-04-02 12:34:02.000000000 +0200 | |
39 | +++ head-2008-11-25/drivers/xen/balloon/sysfs.c 2008-11-25 13:31:07.000000000 +0100 | |
40 | @@ -30,6 +30,7 @@ | |
41 | ||
42 | #include <linux/capability.h> | |
43 | #include <linux/errno.h> | |
44 | +#include <linux/init.h> | |
45 | #include <linux/stat.h> | |
46 | #include <linux/string.h> | |
47 | #include <linux/sysdev.h> | |
48 | @@ -111,7 +112,7 @@ static struct sysdev_class balloon_sysde | |
49 | ||
50 | static struct sys_device balloon_sysdev; | |
51 | ||
52 | -static int register_balloon(struct sys_device *sysdev) | |
53 | +static int __init register_balloon(struct sys_device *sysdev) | |
54 | { | |
55 | int i, error; | |
56 | ||
57 | @@ -148,7 +149,7 @@ static int register_balloon(struct sys_d | |
58 | return error; | |
59 | } | |
60 | ||
61 | -static void unregister_balloon(struct sys_device *sysdev) | |
62 | +static __exit void unregister_balloon(struct sys_device *sysdev) | |
63 | { | |
64 | int i; | |
65 | ||
66 | @@ -159,12 +160,12 @@ static void unregister_balloon(struct sy | |
67 | sysdev_class_unregister(&balloon_sysdev_class); | |
68 | } | |
69 | ||
70 | -int balloon_sysfs_init(void) | |
71 | +int __init balloon_sysfs_init(void) | |
72 | { | |
73 | return register_balloon(&balloon_sysdev); | |
74 | } | |
75 | ||
76 | -void balloon_sysfs_exit(void) | |
77 | +void __exit balloon_sysfs_exit(void) | |
78 | { | |
79 | unregister_balloon(&balloon_sysdev); | |
80 | } |