xen-balloon.c (b675b3667f6729dcd1036a2a129b35445947f905) | xen-balloon.c (ead1d01425bbd28c4354b539caa4075bde00ed72) |
---|---|
1/****************************************************************************** 2 * Xen balloon driver - enables returning/claiming memory to/from Xen. 3 * 4 * Copyright (c) 2003, B Dragovic 5 * Copyright (c) 2003-2004, M Williamson, K Fraser 6 * Copyright (c) 2005 Dan M. Smith, IBM Corporation 7 * 8 * This program is free software; you can redistribute it and/or --- 193 unchanged lines hidden (view full) --- 202 203static struct attribute *balloon_info_attrs[] = { 204 &dev_attr_current_kb.attr, 205 &dev_attr_low_kb.attr, 206 &dev_attr_high_kb.attr, 207 NULL 208}; 209 | 1/****************************************************************************** 2 * Xen balloon driver - enables returning/claiming memory to/from Xen. 3 * 4 * Copyright (c) 2003, B Dragovic 5 * Copyright (c) 2003-2004, M Williamson, K Fraser 6 * Copyright (c) 2005 Dan M. Smith, IBM Corporation 7 * 8 * This program is free software; you can redistribute it and/or --- 193 unchanged lines hidden (view full) --- 202 203static struct attribute *balloon_info_attrs[] = { 204 &dev_attr_current_kb.attr, 205 &dev_attr_low_kb.attr, 206 &dev_attr_high_kb.attr, 207 NULL 208}; 209 |
210static struct attribute_group balloon_info_group = { | 210static const struct attribute_group balloon_info_group = { |
211 .name = "info", 212 .attrs = balloon_info_attrs 213}; 214 215static struct bus_type balloon_subsys = { 216 .name = BALLOON_CLASS_NAME, 217 .dev_name = BALLOON_CLASS_NAME, 218}; 219 220static int register_balloon(struct device *dev) 221{ 222 int i, error; 223 | 211 .name = "info", 212 .attrs = balloon_info_attrs 213}; 214 215static struct bus_type balloon_subsys = { 216 .name = BALLOON_CLASS_NAME, 217 .dev_name = BALLOON_CLASS_NAME, 218}; 219 220static int register_balloon(struct device *dev) 221{ 222 int i, error; 223 |
224 error = subsys_system_register(&balloon_subsys, NULL); | 224 error = bus_register(&balloon_subsys); |
225 if (error) 226 return error; 227 228 dev->id = 0; 229 dev->bus = &balloon_subsys; 230 231 error = device_register(dev); 232 if (error) { --- 25 unchanged lines hidden --- | 225 if (error) 226 return error; 227 228 dev->id = 0; 229 dev->bus = &balloon_subsys; 230 231 error = device_register(dev); 232 if (error) { --- 25 unchanged lines hidden --- |