]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'driver-core/driver-core-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 04:49:30 +0000 (14:49 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 04:49:30 +0000 (14:49 +1000)
Conflicts:
drivers/base/cpu.c
drivers/base/memory.c

1  2 
arch/arm/Kconfig
arch/cris/arch-v32/drivers/Kconfig
arch/mips/Kconfig
arch/powerpc/Kconfig
drivers/base/core.c
drivers/base/cpu.c
drivers/base/memory.c
drivers/base/platform.c
drivers/edac/Kconfig
init/Kconfig
kernel/power/Kconfig

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 1d110dc6f0c1f371ac262a9f6e352b5d626bf2fa,c377673320eda18e32c7eb25aa87e72e4deb12e6..b9f0eecc8acdb66b7b72728afe42f9ee639edfda
@@@ -102,20 -125,8 +102,19 @@@ static ssize_t cpu_release_store(struc
  static DEVICE_ATTR(probe, S_IWUSR, NULL, cpu_probe_store);
  static DEVICE_ATTR(release, S_IWUSR, NULL, cpu_release_store);
  #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */
  #endif /* CONFIG_HOTPLUG_CPU */
  
 +struct bus_type cpu_subsys = {
 +      .name = "cpu",
 +      .dev_name = "cpu",
 +      .match = cpu_subsys_match,
 +#ifdef CONFIG_HOTPLUG_CPU
 +      .online = cpu_subsys_online,
 +      .offline = cpu_subsys_offline,
 +#endif
 +};
 +EXPORT_SYMBOL_GPL(cpu_subsys);
 +
  #ifdef CONFIG_KEXEC
  #include <linux/kexec.h>
  
@@@ -151,8 -162,35 +150,25 @@@ static ssize_t show_crash_notes_size(st
        return rc;
  }
  static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL);
+ static struct attribute *crash_note_cpu_attrs[] = {
+       &dev_attr_crash_notes.attr,
+       &dev_attr_crash_notes_size.attr,
+       NULL
+ };
+ static struct attribute_group crash_note_cpu_attr_group = {
+       .attrs = crash_note_cpu_attrs,
+ };
  #endif
  
 -static const struct attribute_group *hotplugable_cpu_attr_groups[] = {
 -#ifdef CONFIG_KEXEC
 -      &crash_note_cpu_attr_group,
 -#endif
 -#ifdef CONFIG_HOTPLUG_CPU
 -      &hotplug_cpu_attr_group,
 -#endif
 -      NULL
 -};
 -
+ static const struct attribute_group *common_cpu_attr_groups[] = {
+ #ifdef CONFIG_KEXEC
+       &crash_note_cpu_attr_group,
+ #endif
+       NULL
+ };
  /*
   * Print cpu online, possible, present, and system maps
   */
@@@ -269,6 -305,9 +285,7 @@@ int __cpuinit register_cpu(struct cpu *
  #ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE
        cpu->dev.bus->uevent = arch_cpu_uevent;
  #endif
 -      if (cpu->hotpluggable)
 -              cpu->dev.groups = hotplugable_cpu_attr_groups;
+       cpu->dev.groups = common_cpu_attr_groups;
        error = device_register(&cpu->dev);
        if (!error)
                per_cpu(cpu_sys_devices, num) = &cpu->dev;
index 4ebf97f99fae0f84fb7d8f28bc9a9bd513f7b5aa,e315051cfeebbdb25a4420b7d3eaeb7d4d57b74f..2b7813ec6d02f31e842d181b61b01fa6be6f4b9d
@@@ -595,6 -493,41 +541,42 @@@ struct memory_block *find_memory_block(
        return find_memory_block_hinted(section, NULL);
  }
  
+ static struct attribute *memory_memblk_attrs[] = {
+       &dev_attr_phys_index.attr,
+       &dev_attr_end_phys_index.attr,
+       &dev_attr_state.attr,
+       &dev_attr_phys_device.attr,
+       &dev_attr_removable.attr,
+       NULL
+ };
+ static struct attribute_group memory_memblk_attr_group = {
+       .attrs = memory_memblk_attrs,
+ };
+ static const struct attribute_group *memory_memblk_attr_groups[] = {
+       &memory_memblk_attr_group,
+       NULL,
+ };
+ /*
+  * register_memory - Setup a sysfs device for a memory block
+  */
+ static
+ int register_memory(struct memory_block *memory)
+ {
+       int error;
+       memory->dev.bus = &memory_subsys;
+       memory->dev.id = memory->start_section_nr / sections_per_block;
+       memory->dev.release = memory_block_release;
+       memory->dev.groups = memory_memblk_attr_groups;
++      memory->dev.offline = memory->state == MEM_OFFLINE;
+       error = device_register(&memory->dev);
+       return error;
+ }
  static int init_memory_block(struct memory_block **memory,
                             struct mem_section *section, unsigned long state)
  {
Simple merge
Simple merge
diff --cc init/Kconfig
Simple merge
Simple merge