Merge branch 'sh/driver-core'
authorPaul Mundt <lethal@linux-sh.org>
Thu, 13 May 2010 09:02:28 +0000 (18:02 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 13 May 2010 09:02:28 +0000 (18:02 +0900)
1  2 
drivers/base/platform.c

diff --combined drivers/base/platform.c
index d10230adeb3650fe5ec38a51c2ef2434dff5da30,ef51b008384044f9d2566663a858ed1b2746eaf4..81865ee2eff39f5c1bcedd7952ccd1cbe9f48901
@@@ -362,8 -362,6 +362,8 @@@ EXPORT_SYMBOL_GPL(platform_device_unreg
   * enumeration tasks, they don't fully conform to the Linux driver model.
   * In particular, when such drivers are built as modules, they can't be
   * "hotplugged".
 + *
 + * Returns &struct platform_device pointer on success, or ERR_PTR() on error.
   */
  struct platform_device *platform_device_register_simple(const char *name,
                                                        int id,
@@@ -410,8 -408,6 +410,8 @@@ EXPORT_SYMBOL_GPL(platform_device_regis
   * allocated for the device allows drivers using such devices to be
   * unloaded without waiting for the last reference to the device to be
   * dropped.
 + *
 + * Returns &struct platform_device pointer on success, or ERR_PTR() on error.
   */
  struct platform_device *platform_device_register_data(
                struct device *parent,
@@@ -563,8 -559,6 +563,8 @@@ EXPORT_SYMBOL_GPL(platform_driver_probe
   *
   * Use this in legacy-style modules that probe hardware directly and
   * register a single platform device and corresponding platform driver.
 + *
 + * Returns &struct platform_device pointer on success, or ERR_PTR() on error.
   */
  struct platform_device * __init_or_module platform_create_bundle(
                        struct platform_driver *driver,
@@@ -1058,11 -1052,9 +1058,11 @@@ static __initdata LIST_HEAD(early_platf
  static __initdata LIST_HEAD(early_platform_device_list);
  
  /**
 - * early_platform_driver_register
 + * early_platform_driver_register - register early platform driver
   * @epdrv: early_platform driver structure
   * @buf: string passed from early_param()
 + *
 + * Helper function for early_platform_init() / early_platform_init_buffer()
   */
  int __init early_platform_driver_register(struct early_platform_driver *epdrv,
                                          char *buf)
  }
  
  /**
 - * early_platform_add_devices - add a numbers of early platform devices
 + * early_platform_add_devices - adds a number of early platform devices
   * @devs: array of early platform devices to add
   * @num: number of early platform devices in array
 + *
 + * Used by early architecture code to register early platform devices and
 + * their platform data.
   */
  void __init early_platform_add_devices(struct platform_device **devs, int num)
  {
  }
  
  /**
 - * early_platform_driver_register_all
 + * early_platform_driver_register_all - register early platform drivers
   * @class_str: string to identify early platform driver class
 + *
 + * Used by architecture code to register all early platform drivers
 + * for a certain class. If omitted then only early platform drivers
 + * with matching kernel command line class parameters will be registered.
   */
  void __init early_platform_driver_register_all(char *class_str)
  {
  }
  
  /**
 - * early_platform_match
 + * early_platform_match - find early platform device matching driver
   * @epdrv: early platform driver structure
   * @id: id to match against
   */
@@@ -1184,7 -1169,7 +1184,7 @@@ early_platform_match(struct early_platf
  }
  
  /**
 - * early_platform_left
 + * early_platform_left - check if early platform driver has matching devices
   * @epdrv: early platform driver structure
   * @id: return true if id or above exists
   */
@@@ -1202,7 -1187,7 +1202,7 @@@ static  __init int early_platform_left(
  }
  
  /**
 - * early_platform_driver_probe_id
 + * early_platform_driver_probe_id - probe drivers matching class_str and id
   * @class_str: string to identify early platform driver class
   * @id: id to match against
   * @nr_probe: number of platform devices to successfully probe before exiting
@@@ -1259,7 -1244,7 +1259,7 @@@ static int __init early_platform_driver
                         * dev_name() and others to be used before the
                         * rest of the driver core is initialized.
                         */
-                       if (!match->dev.init_name) {
+                       if (!match->dev.init_name && slab_is_available()) {
                                if (match->id != -1)
                                        match->dev.init_name =
                                                kasprintf(GFP_KERNEL, "%s.%d",
  }
  
  /**
 - * early_platform_driver_probe
 + * early_platform_driver_probe - probe a class of registered drivers
   * @class_str: string to identify early platform driver class
   * @nr_probe: number of platform devices to successfully probe before exiting
   * @user_only: only probe user specified early platform devices
 + *
 + * Used by architecture code to probe registered early platform drivers
 + * within a certain class. For probe to happen a registered early platform
 + * device matching a registered early platform driver is needed.
   */
  int __init early_platform_driver_probe(char *class_str,
                                       int nr_probe,