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/gpio/imx_rgpio2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio/imx_rgpio2p.c') diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index 1e876f69147..2a09975b6e4 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -200,7 +200,7 @@ U_BOOT_DRIVER(imx_rgpio2p) = { .id = UCLASS_GPIO, .ops = &imx_rgpio2p_ops, .probe = imx_rgpio2p_probe, - .priv_auto_alloc_size = sizeof(struct imx_rgpio2p_plat), + .priv_auto = sizeof(struct imx_rgpio2p_plat), .of_match = imx_rgpio2p_ids, .bind = imx_rgpio2p_bind, }; -- 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/gpio/imx_rgpio2p.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/gpio/imx_rgpio2p.c') diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index 2a09975b6e4..80e934eb0d2 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -151,12 +151,12 @@ static int imx_rgpio2p_probe(struct udevice *dev) static int imx_rgpio2p_bind(struct udevice *dev) { - struct imx_rgpio2p_plat *plat = dev->platdata; + struct imx_rgpio2p_plat *plat = dev->plat; fdt_addr_t addr; /* - * If platdata already exsits, directly return. - * Actually only when DT is not supported, platdata + * If plat already exsits, directly return. + * Actually only when DT is not supported, plat * is statically initialized in U_BOOT_DEVICES.Here * will return. */ @@ -171,7 +171,7 @@ static int imx_rgpio2p_bind(struct udevice *dev) * TODO: * When every board is converted to driver model and DT is supported, * this can be done by auto-alloc feature, but not using calloc - * to alloc memory for platdata. + * to alloc memory for plat. * * For example imx_rgpio2p_plat uses platform data rather than device * tree. @@ -184,7 +184,7 @@ static int imx_rgpio2p_bind(struct udevice *dev) plat->regs = (struct gpio_regs *)addr; plat->bank_index = dev->req_seq; - dev->platdata = plat; + dev->plat = plat; return 0; } -- 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/gpio/imx_rgpio2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpio/imx_rgpio2p.c') diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index 80e934eb0d2..70ced75ea72 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -132,7 +132,7 @@ static const struct dm_gpio_ops imx_rgpio2p_ops = { static int imx_rgpio2p_probe(struct udevice *dev) { struct imx_rgpio2p_data *bank = dev_get_priv(dev); - struct imx_rgpio2p_plat *plat = dev_get_platdata(dev); + struct imx_rgpio2p_plat *plat = dev_get_plat(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); int banknum; char name[18], *str; -- cgit v1.2.3