[U-Boot] [PATCH v2 35/55] dm: core: Rename DM_NAME_ALLOCED to DM_FLAG_NAME_ALLOCED
Simon Glass
sjg at chromium.org
Mon Jun 13 07:33:16 CEST 2016
This is a flag. Adjust the name to be consistent with the other flags.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2: None
drivers/core/device-remove.c | 2 +-
drivers/core/device.c | 2 +-
include/dm/device.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 0e56b23..a7f77b4 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -112,7 +112,7 @@ int device_unbind(struct udevice *dev)
devres_release_all(dev);
- if (dev->flags & DM_NAME_ALLOCED)
+ if (dev->flags & DM_FLAG_NAME_ALLOCED)
free((char *)dev->name);
free(dev);
diff --git a/drivers/core/device.c b/drivers/core/device.c
index de52f07..d3b731e 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -727,7 +727,7 @@ bool device_is_last_sibling(struct udevice *dev)
void device_set_name_alloced(struct udevice *dev)
{
- dev->flags |= DM_NAME_ALLOCED;
+ dev->flags |= DM_FLAG_NAME_ALLOCED;
}
int device_set_name(struct udevice *dev, const char *name)
diff --git a/include/dm/device.h b/include/dm/device.h
index f03bcd3..0259627 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -42,7 +42,7 @@ struct driver_info;
#define DM_FLAG_BOUND (1 << 6)
/* Device name is allocated and should be freed on unbind() */
-#define DM_NAME_ALLOCED (1 << 7)
+#define DM_FLAG_NAME_ALLOCED (1 << 7)
/**
* struct udevice - An instance of a driver
@@ -540,7 +540,7 @@ int device_set_name(struct udevice *dev, const char *name);
/**
* device_set_name_alloced() - note that a device name is allocated
*
- * This sets the DM_NAME_ALLOCED flag for the device, so that when it is
+ * This sets the DM_FLAG_NAME_ALLOCED flag for the device, so that when it is
* unbound the name will be freed. This avoids memory leaks.
*
* @dev: Device to update
--
2.8.0.rc3.226.g39d4020
More information about the U-Boot
mailing list