diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-04 02:55:17 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 18:00:25 +0300 |
commit | 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (patch) | |
tree | c27d9450fb5e72372be8483fc15079467b588169 /include | |
parent | 78128d52dfca9fff53770c7aed2e4673070c5978 (diff) | |
download | u-boot-41575d8e4c334df148c4cdd7c40cc825dc0fcaa1.tar.xz |
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')
-rw-r--r-- | include/dm/device.h | 18 | ||||
-rw-r--r-- | include/dm/uclass.h | 20 | ||||
-rw-r--r-- | include/dwmmc.h | 2 | ||||
-rw-r--r-- | include/sdhci.h | 2 | ||||
-rw-r--r-- | include/spi.h | 2 |
5 files changed, 22 insertions, 22 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; }; diff --git a/include/dwmmc.h b/include/dwmmc.h index d8a8355a0a..c53694654e 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -256,7 +256,7 @@ static inline u8 dwmci_readb(struct dwmci_host *host, int reg) * ... * * Inside U_BOOT_DRIVER(): - * .platdata_auto_alloc_size = sizeof(struct rockchip_mmc_plat), + * .platdata_auto = sizeof(struct rockchip_mmc_plat), * * To access platform data: * struct rockchip_mmc_plat *plat = dev_get_platdata(dev); diff --git a/include/sdhci.h b/include/sdhci.h index 1fd20ec086..d04afd53b1 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -440,7 +440,7 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) * ... * * Inside U_BOOT_DRIVER(): - * .platdata_auto_alloc_size = sizeof(struct msm_sdhc_plat), + * .platdata_auto = sizeof(struct msm_sdhc_plat), * * To access platform data: * struct msm_sdhc_plat *plat = dev_get_platdata(dev); diff --git a/include/spi.h b/include/spi.h index ef8c1f6692..f69c08d287 100644 --- a/include/spi.h +++ b/include/spi.h @@ -102,7 +102,7 @@ enum spi_polarity { * * For driver model this is the per-child data used by the SPI bus. It can * be accessed using dev_get_parent_priv() on the slave device. The SPI uclass - * sets uip per_child_auto_alloc_size to sizeof(struct spi_slave), and the + * sets up per_child_auto to sizeof(struct spi_slave), and the * driver should not override it. Two platform data fields (max_hz and mode) * are copied into this structure to provide an initial value. This allows * them to be changed, since we should never change platform data in drivers. |