dm: core: Rename DM_NAME_ALLOCED to DM_FLAG_NAME_ALLOCED
authorSimon Glass <sjg@chromium.org>
Mon, 4 Jul 2016 17:58:15 +0000 (11:58 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 15 Jul 2016 02:40:24 +0000 (20:40 -0600)
This is a flag. Adjust the name to be consistent with the other flags.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device-remove.c
drivers/core/device.c
include/dm/device.h

index 0e56b23..a7f77b4 100644 (file)
@@ -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);
 
index d8f9d5b..6967c3d 100644 (file)
@@ -738,7 +738,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)
index 1bfcf3b..fc35f4d 100644 (file)
@@ -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
@@ -553,7 +553,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