summaryrefslogtreecommitdiffstats
path: root/include/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:17 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 08:00:25 -0700
commit41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (patch)
treec27d9450fb5e72372be8483fc15079467b588169 /include/dm
parent78128d52dfca9fff53770c7aed2e4673070c5978 (diff)
downloadu-boot-41575d8e4c334df148c4cdd7c40cc825dc0fcaa1.tar.gz
u-boot-41575d8e4c334df148c4cdd7c40cc825dc0fcaa1.tar.xz
u-boot-41575d8e4c334df148c4cdd7c40cc825dc0fcaa1.zip
dm: treewide: Rename auto_alloc_size members to be shorter
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device.h18
-rw-r--r--include/dm/uclass.h20
2 files changed, 19 insertions, 19 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 25a77d08b9..f4c2b9b246 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -111,7 +111,7 @@ enum {
* probe method if the device has a device tree node.
*
* All three of platdata, priv and uclass_priv can be allocated by the
- * driver, or you can use the auto_alloc_size members of struct driver and
+ * driver, or you can use the 'auto' members of struct driver and
* struct uclass_driver to have driver model do this automatically.
*
* @driver: The driver used by this device
@@ -225,18 +225,18 @@ struct udevice_id {
* memory allocated but it has not yet been probed.
* @child_post_remove: Called after a child device is removed. The device
* has memory allocated but its device_remove() method has been called.
- * @priv_auto_alloc_size: If non-zero this is the size of the private data
+ * @priv_auto: If non-zero this is the size of the private data
* to be allocated in the device's ->priv pointer. If zero, then the driver
* is responsible for allocating any data required.
- * @platdata_auto_alloc_size: If non-zero this is the size of the
+ * @platdata_auto: If non-zero this is the size of the
* platform data to be allocated in the device's ->platdata pointer.
* This is typically only useful for device-tree-aware drivers (those with
* an of_match), since drivers which use platdata will have the data
* provided in the U_BOOT_DEVICE() instantiation.
- * @per_child_auto_alloc_size: Each device can hold private data owned by
+ * @per_child_auto: Each device can hold private data owned by
* its parent. If required this will be automatically allocated if this
* value is non-zero.
- * @per_child_platdata_auto_alloc_size: A bus likes to store information about
+ * @per_child_platdata_auto: A bus likes to store information about
* its children. If non-zero this is the size of this data, to be allocated
* in the child's parent_platdata pointer.
* @ops: Driver-specific operations. This is typically a list of function
@@ -258,10 +258,10 @@ struct driver {
int (*child_post_bind)(struct udevice *dev);
int (*child_pre_probe)(struct udevice *dev);
int (*child_post_remove)(struct udevice *dev);
- int priv_auto_alloc_size;
- int platdata_auto_alloc_size;
- int per_child_auto_alloc_size;
- int per_child_platdata_auto_alloc_size;
+ int priv_auto;
+ int platdata_auto;
+ int per_child_auto;
+ int per_child_platdata_auto;
const void *ops; /* driver-specific operations */
uint32_t flags;
#if CONFIG_IS_ENABLED(ACPIGEN)
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index 7188304304..e74082fbdf 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -65,19 +65,19 @@ struct udevice;
* @child_post_probe: Called after a child in this uclass is probed
* @init: Called to set up the uclass
* @destroy: Called to destroy the uclass
- * @priv_auto_alloc_size: If non-zero this is the size of the private data
+ * @priv_auto: If non-zero this is the size of the private data
* to be allocated in the uclass's ->priv pointer. If zero, then the uclass
* driver is responsible for allocating any data required.
- * @per_device_auto_alloc_size: Each device can hold private data owned
+ * @per_device_auto: Each device can hold private data owned
* by the uclass. If required this will be automatically allocated if this
* value is non-zero.
- * @per_device_platdata_auto_alloc_size: Each device can hold platform data
+ * @per_device_platdata_auto: Each device can hold platform data
* owned by the uclass as 'dev->uclass_platdata'. If the value is non-zero,
* then this will be automatically allocated.
- * @per_child_auto_alloc_size: Each child device (of a parent in this
+ * @per_child_auto: Each child device (of a parent in this
* uclass) can hold parent data for the device/uclass. This value is only
* used as a fallback if this member is 0 in the driver.
- * @per_child_platdata_auto_alloc_size: A bus likes to store information about
+ * @per_child_platdata_auto: A bus likes to store information about
* its children. If non-zero this is the size of this data, to be allocated
* in the child device's parent_platdata pointer. This value is only used as
* a fallback if this member is 0 in the driver.
@@ -98,11 +98,11 @@ struct uclass_driver {
int (*child_post_probe)(struct udevice *dev);
int (*init)(struct uclass *class);
int (*destroy)(struct uclass *class);
- int priv_auto_alloc_size;
- int per_device_auto_alloc_size;
- int per_device_platdata_auto_alloc_size;
- int per_child_auto_alloc_size;
- int per_child_platdata_auto_alloc_size;
+ int priv_auto;
+ int per_device_auto;
+ int per_device_platdata_auto;
+ int per_child_auto;
+ int per_child_platdata_auto;
const void *ops;
uint32_t flags;
};