Commit 06fe53beb636294587d8e94ef83c06cef07c21fd

Authored by Paul Mundt
1 parent bd05086bbe

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 <lethal@linux-sh.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/base/platform.c
... ... @@ -1244,7 +1244,7 @@
1244 1244 * dev_name() and others to be used before the
1245 1245 * rest of the driver core is initialized.
1246 1246 */
1247   - if (!match->dev.init_name) {
  1247 + if (!match->dev.init_name && slab_is_available()) {
1248 1248 if (match->id != -1)
1249 1249 match->dev.init_name =
1250 1250 kasprintf(GFP_KERNEL, "%s.%d",