diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/Kconfig | 9 | ||||
-rw-r--r-- | drivers/core/device.c | 19 |
2 files changed, 11 insertions, 17 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 00554af499..1eccac28c6 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -329,15 +329,6 @@ config ACPIGEN things like generating device-specific tables and returning the ACPI name of a device. -config INTEL_ACPIGEN - bool "Support ACPI table generation for Intel SoCs" - depends on ACPIGEN - help - This option adds some functions used for programatic generation of - ACPI tables on Intel SoCs. This provides features for writing CPU - information such as P states and T stages. Also included is a way - to create a GNVS table and set it up. - config BOUNCE_BUFFER bool "Include bounce buffer API" help diff --git a/drivers/core/device.c b/drivers/core/device.c index d1098a3861..81f6880eac 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -137,9 +137,8 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, if (parent) { size = parent->driver->per_child_plat_auto; - if (!size) { + if (!size) size = parent->uclass->uc_drv->per_child_plat_auto; - } if (size) { dev_or_flags(dev, DM_FLAG_ALLOC_PARENT_PDATA); ptr = calloc(1, size); @@ -209,14 +208,18 @@ fail_uclass_bind: } } fail_alloc3: - if (dev_get_flags(dev) & DM_FLAG_ALLOC_UCLASS_PDATA) { - free(dev_get_uclass_plat(dev)); - dev_set_uclass_plat(dev, NULL); + if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (dev_get_flags(dev) & DM_FLAG_ALLOC_UCLASS_PDATA) { + free(dev_get_uclass_plat(dev)); + dev_set_uclass_plat(dev, NULL); + } } fail_alloc2: - if (dev_get_flags(dev) & DM_FLAG_ALLOC_PDATA) { - free(dev_get_plat(dev)); - dev_set_plat(dev, NULL); + if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) { + if (dev_get_flags(dev) & DM_FLAG_ALLOC_PDATA) { + free(dev_get_plat(dev)); + dev_set_plat(dev, NULL); + } } fail_alloc1: devres_release_all(dev); |