]> 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>
Wed, 19 Jun 2013 05:26:01 +0000 (15:26 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 05:26:01 +0000 (15:26 +1000)
Conflicts:
drivers/base/cpu.c
drivers/base/firmware_class.c
drivers/base/memory.c
include/linux/platform_device.h

13 files changed:
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/firmware_class.c
drivers/base/memory.c
drivers/base/platform.c
drivers/edac/Kconfig
include/linux/platform_device.h
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 01e21037d8feb5c04e6aedee608e9cdedc0d87bd,6ede2292f67e551edc2fa1cef331572a7f84dfec..57aa8425d54b97c4dbc4a95bb21198c97bea8166
@@@ -446,22 -452,11 +452,18 @@@ static struct firmware_priv *to_firmwar
        return container_of(dev, struct firmware_priv, dev);
  }
  
- static void fw_load_abort(struct firmware_priv *fw_priv)
+ static void fw_load_abort(struct firmware_buf *buf)
  {
-       struct firmware_buf *buf = fw_priv->buf;
 +      /*
 +       * There is a small window in which user can write to 'loading'
 +       * between loading done and disappearance of 'loading'
 +       */
 +      if (test_bit(FW_STATUS_DONE, &buf->status))
 +              return;
 +
+       list_del_init(&buf->pending_list);
        set_bit(FW_STATUS_ABORT, &buf->status);
        complete_all(&buf->completion);
-       /* avoid user action after loading abort */
-       fw_priv->buf = NULL;
  }
  
  #define is_fw_load_aborted(buf)       \
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
index 3413897474e17bf09358489c3e483a8e58e19a50,cd46ee58b9dcdd82a394202311146840131e8319..ce8e4ffd78c773a1923c18cc53403726e79f71bf
@@@ -180,10 -180,13 +180,16 @@@ struct platform_driver 
        const struct platform_device_id *id_table;
  };
  
- extern int platform_driver_register(struct platform_driver *);
 +#define to_platform_driver(drv)       (container_of((drv), struct platform_driver, \
 +                               driver))
 +
+ /*
+  * use a macro to avoid include chaining to get THIS_MODULE
+  */
+ #define platform_driver_register(drv) \
+       __platform_driver_register(drv, THIS_MODULE)
+ extern int __platform_driver_register(struct platform_driver *,
+                                       struct module *);
  extern void platform_driver_unregister(struct platform_driver *);
  
  /* non-hotpluggable platform devices may use this so that probe() and
diff --cc init/Kconfig
Simple merge
Simple merge