]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - drivers/base/platform.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6.git] / drivers / base / platform.c
index d10230adeb3650fe5ec38a51c2ef2434dff5da30..765bcf0df3bbaf2a22635990f85294a70167d900 100644 (file)
@@ -187,7 +187,7 @@ EXPORT_SYMBOL_GPL(platform_device_alloc);
  * released.
  */
 int platform_device_add_resources(struct platform_device *pdev,
-                                 struct resource *res, unsigned int num)
+                                 const struct resource *res, unsigned int num)
 {
        struct resource *r;
 
@@ -367,7 +367,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
  */
 struct platform_device *platform_device_register_simple(const char *name,
                                                        int id,
-                                                       struct resource *res,
+                                                       const struct resource *res,
                                                        unsigned int num)
 {
        struct platform_device *pdev;
@@ -1259,7 +1259,7 @@ static int __init early_platform_driver_probe_id(char *class_str,
                         * 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",