diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 182192892d45..241b96bcd7ad 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -451,6 +451,10 @@ struct device { | |||
| 451 | 451 | ||
| 452 | static inline const char *dev_name(const struct device *dev) | 452 | static inline const char *dev_name(const struct device *dev) |
| 453 | { | 453 | { |
| 454 | /* Use the init name until the kobject becomes available */ | ||
| 455 | if (dev->init_name) | ||
| 456 | return dev->init_name; | ||
| 457 | |||
| 454 | return kobject_name(&dev->kobj); | 458 | return kobject_name(&dev->kobj); |
| 455 | } | 459 | } |
| 456 | 460 | ||
