From 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:17 -0700 Subject: 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 --- drivers/misc/swap_case.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/misc/swap_case.c') diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index 07c67577d54..d75df8e9639 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -391,8 +391,8 @@ U_BOOT_DRIVER(sandbox_swap_case_emul) = { .id = UCLASS_PCI_EMUL, .of_match = sandbox_swap_case_ids, .ops = &sandbox_swap_case_emul_ops, - .priv_auto_alloc_size = sizeof(struct swap_case_priv), - .platdata_auto_alloc_size = sizeof(struct swap_case_platdata), + .priv_auto = sizeof(struct swap_case_priv), + .platdata_auto = sizeof(struct swap_case_platdata), }; static struct pci_device_id sandbox_swap_case_supported[] = { -- cgit v1.2.3 From caa4daa2ae3dc0a3e516addea5772c9af76abcb0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:18 -0700 Subject: dm: treewide: Rename 'platdata' variables to just 'plat' We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass --- drivers/misc/swap_case.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/misc/swap_case.c') diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index d75df8e9639..5de78410e66 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -392,7 +392,7 @@ U_BOOT_DRIVER(sandbox_swap_case_emul) = { .of_match = sandbox_swap_case_ids, .ops = &sandbox_swap_case_emul_ops, .priv_auto = sizeof(struct swap_case_priv), - .platdata_auto = sizeof(struct swap_case_platdata), + .plat_auto = sizeof(struct swap_case_platdata), }; static struct pci_device_id sandbox_swap_case_supported[] = { -- cgit v1.2.3 From c69cda25c9b59e53a6bc8969ada58942549f5b5d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:20 -0700 Subject: dm: treewide: Rename dev_get_platdata() to dev_get_plat() Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass --- drivers/misc/swap_case.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/misc/swap_case.c') diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index 5de78410e66..9dd3b06f81b 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -100,7 +100,7 @@ static int sandbox_swap_case_read_config(const struct udevice *emul, uint offset, ulong *valuep, enum pci_size_t size) { - struct swap_case_platdata *plat = dev_get_platdata(emul); + struct swap_case_platdata *plat = dev_get_plat(emul); /* * The content of the EA capability structure is handled elsewhere to @@ -200,7 +200,7 @@ static int sandbox_swap_case_read_config(const struct udevice *emul, static int sandbox_swap_case_write_config(struct udevice *emul, uint offset, ulong value, enum pci_size_t size) { - struct swap_case_platdata *plat = dev_get_platdata(emul); + struct swap_case_platdata *plat = dev_get_plat(emul); switch (offset) { case PCI_COMMAND: @@ -228,7 +228,7 @@ static int sandbox_swap_case_write_config(struct udevice *emul, uint offset, static int sandbox_swap_case_find_bar(struct udevice *emul, unsigned int addr, int *barnump, unsigned int *offsetp) { - struct swap_case_platdata *plat = dev_get_platdata(emul); + struct swap_case_platdata *plat = dev_get_plat(emul); int barnum; for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) { -- cgit v1.2.3 From 8a8d24bdf174851ebb8607f359d54b72e3283b97 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:23 -0700 Subject: dm: treewide: Rename ..._platdata variables to just ..._plat Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass --- drivers/misc/swap_case.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/misc/swap_case.c') diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index 9dd3b06f81b..abea0e76139 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -15,12 +15,12 @@ #include /** - * struct swap_case_platdata - platform data for this device + * struct swap_case_plat - platform data for this device * * @command: Current PCI command value * @bar: Current base address values */ -struct swap_case_platdata { +struct swap_case_plat { u16 command; u32 bar[6]; }; @@ -100,7 +100,7 @@ static int sandbox_swap_case_read_config(const struct udevice *emul, uint offset, ulong *valuep, enum pci_size_t size) { - struct swap_case_platdata *plat = dev_get_plat(emul); + struct swap_case_plat *plat = dev_get_plat(emul); /* * The content of the EA capability structure is handled elsewhere to @@ -200,7 +200,7 @@ static int sandbox_swap_case_read_config(const struct udevice *emul, static int sandbox_swap_case_write_config(struct udevice *emul, uint offset, ulong value, enum pci_size_t size) { - struct swap_case_platdata *plat = dev_get_plat(emul); + struct swap_case_plat *plat = dev_get_plat(emul); switch (offset) { case PCI_COMMAND: @@ -228,7 +228,7 @@ static int sandbox_swap_case_write_config(struct udevice *emul, uint offset, static int sandbox_swap_case_find_bar(struct udevice *emul, unsigned int addr, int *barnump, unsigned int *offsetp) { - struct swap_case_platdata *plat = dev_get_plat(emul); + struct swap_case_plat *plat = dev_get_plat(emul); int barnum; for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) { @@ -392,7 +392,7 @@ U_BOOT_DRIVER(sandbox_swap_case_emul) = { .of_match = sandbox_swap_case_ids, .ops = &sandbox_swap_case_emul_ops, .priv_auto = sizeof(struct swap_case_priv), - .plat_auto = sizeof(struct swap_case_platdata), + .plat_auto = sizeof(struct swap_case_plat), }; static struct pci_device_id sandbox_swap_case_supported[] = { -- cgit v1.2.3