diff options
author | Mark Brown | 2012-02-20 03:35:12 +0100 |
---|---|---|
committer | Mark Brown | 2012-02-20 03:35:12 +0100 |
commit | fa2c8f401797eee814b7b9fa0b23fa6c4c3f5533 (patch) | |
tree | 826fb23071b866e112d6e9c510fe3ad4d668acdc /drivers/base/cpu.c | |
parent | ASoC: Add __devinit annotation for pxa2xx_ac97_probe (diff) | |
parent | Linux 3.3-rc4 (diff) | |
download | kernel-qcow2-linux-fa2c8f401797eee814b7b9fa0b23fa6c4c3f5533.tar.gz kernel-qcow2-linux-fa2c8f401797eee814b7b9fa0b23fa6c4c3f5533.tar.xz kernel-qcow2-linux-fa2c8f401797eee814b7b9fa0b23fa6c4c3f5533.zip |
Merge tag 'v3.3-rc4' into for-3.4 in order to resolve the conflict
resolved below within the FSI driver and allow the application of the
dmaeengine conversion that depends on this resolution.
Linux 3.3-rc4
Conflicts:
sound/soc/sh/fsi.c
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r-- | drivers/base/cpu.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index db87e78d7459..4dabf5077c48 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -208,6 +208,25 @@ static ssize_t print_cpus_offline(struct device *dev, } static DEVICE_ATTR(offline, 0444, print_cpus_offline, NULL); +static void cpu_device_release(struct device *dev) +{ + /* + * This is an empty function to prevent the driver core from spitting a + * warning at us. Yes, I know this is directly opposite of what the + * documentation for the driver core and kobjects say, and the author + * of this code has already been publically ridiculed for doing + * something as foolish as this. However, at this point in time, it is + * the only way to handle the issue of statically allocated cpu + * devices. The different architectures will have their cpu device + * code reworked to properly handle this in the near future, so this + * function will then be changed to correctly free up the memory held + * by the cpu device. + * + * Never copy this way of doing things, or you too will be made fun of + * on the linux-kerenl list, you have been warned. + */ +} + /* * register_cpu - Setup a sysfs device for a CPU. * @cpu - cpu->hotpluggable field set to 1 will generate a control file in @@ -221,8 +240,10 @@ int __cpuinit register_cpu(struct cpu *cpu, int num) int error; cpu->node_id = cpu_to_node(num); + memset(&cpu->dev, 0x00, sizeof(struct device)); cpu->dev.id = num; cpu->dev.bus = &cpu_subsys; + cpu->dev.release = cpu_device_release; error = device_register(&cpu->dev); if (!error && cpu->hotpluggable) register_cpu_control(cpu); |