xen/balloon: Move the registration from device to subsystem.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 12 Jan 2012 16:35:50 +0000 (11:35 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 12 Jan 2012 16:53:59 +0000 (11:53 -0500)
With git commit 070680218379e15c1901f4bf21b98e3cbf12b527
"xen-balloon: convert sysdev_class to a regular subsystem" we would
end up with the attributes being put in:

 /sys/devices/xen_memory0/target_kb
instead of
/sys/devices/system/xen_memory/xen_memory0/target_kb

Making the tools inable to deflate the kernel to make more space
for launching another guest and printing:
Error: Failed to query current memory allocation of dom0

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Suggested-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-balloon.c

index 3832e303c33aca5ceabf0bb1540e02a28b7765bc..596e6a7b17d68bc3ebf424cc11344da1cc32f1e5 100644 (file)
@@ -221,7 +221,7 @@ static int register_balloon(struct device *dev)
 {
        int i, error;
 
-       error = bus_register(&balloon_subsys);
+       error = subsys_system_register(&balloon_subsys, NULL);
        if (error)
                return error;