diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:17 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 08:00:25 -0700 |
commit | 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (patch) | |
tree | c27d9450fb5e72372be8483fc15079467b588169 /doc/driver-model/ethernet.rst | |
parent | 78128d52dfca9fff53770c7aed2e4673070c5978 (diff) | |
download | u-boot-41575d8e4c334df148c4cdd7c40cc825dc0fcaa1.tar.gz |
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 'doc/driver-model/ethernet.rst')
-rw-r--r-- | doc/driver-model/ethernet.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/driver-model/ethernet.rst b/doc/driver-model/ethernet.rst index 1f5310daaa..781644d2e2 100644 --- a/doc/driver-model/ethernet.rst +++ b/doc/driver-model/ethernet.rst @@ -28,14 +28,14 @@ the UCLASS_ETH .id field in the U-Boot driver struct: .ofdata_to_platdata = eth_ape_ofdata_to_platdata, .probe = eth_ape_probe, .ops = ð_ape_ops, - .priv_auto_alloc_size = sizeof(struct eth_ape_priv), - .platdata_auto_alloc_size = sizeof(struct eth_ape_pdata), + .priv_auto = sizeof(struct eth_ape_priv), + .platdata_auto = sizeof(struct eth_ape_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; struct eth_ape_priv contains runtime per-instance data, like buffers, pointers to current descriptors, current speed settings, pointers to PHY related data -(like struct mii_dev) and so on. Declaring its size in .priv_auto_alloc_size +(like struct mii_dev) and so on. Declaring its size in .priv_auto will let the driver framework allocate it at the right time. It can be retrieved using a dev_get_priv(dev) call. @@ -43,7 +43,7 @@ struct eth_ape_pdata contains static platform data, like the MMIO base address, a hardware variant, the MAC address. ``struct eth_pdata eth_pdata`` as the first member of this struct helps to avoid duplicated code. If you don't need any more platform data beside the standard member, -just use sizeof(struct eth_pdata) for the platdata_auto_alloc_size. +just use sizeof(struct eth_pdata) for the platdata_auto. PCI devices add a line pointing to supported vendor/device ID pairs: |