From: Paul Mundt Date: Thu, 13 May 2010 08:56:56 +0000 (+0900) Subject: driver core: Early dev_name() depends on slab_is_available(). X-Git-Tag: accepted/tizen/common/20141203.182822~11746^2~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06fe53beb636294587d8e94ef83c06cef07c21fd;p=platform%2Fkernel%2Flinux-arm64.git driver core: Early dev_name() depends on slab_is_available(). The early dev_name() setup needs to do an allocation which can only be satisfied under slab_is_available() conditions. Some of the early platform drivers may be initialized before this point, and those still need to contend themselves with an empty dev_name. This fixes up a regression with the SH earlyprintk which was bailing out prior to hitting the early probe path due to not being able to satisfy the early allocation. Other early platform drivers (such as the early timers) that need to match the dev name are sufficiently late that allocations are already possible. Signed-off-by: Paul Mundt --- diff --git a/drivers/base/platform.c b/drivers/base/platform.c index f2377f3..ef51b00 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1244,7 +1244,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",