diff mbox

[U-Boot] dm: serial: pl01x: Add priv_auto_alloc_size

Message ID 1418199857-30565-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com
State Rejected
Delegated to: Simon Glass
Headers show

Commit Message

Nobuhiro Iwamatsu Dec. 10, 2014, 8:24 a.m. UTC
This driver uses struct pl01x_priv as private data. However, the area of this
structure has not been reserved.
This reserves area of struct pl01x_priv by using priv_auto_alloc_size.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
 drivers/serial/serial_pl01x.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass Dec. 10, 2014, 6 p.m. UTC | #1
Hi,

On 10 December 2014 at 01:24, Nobuhiro Iwamatsu
<nobuhiro.iwamatsu.yj@renesas.com> wrote:
> This driver uses struct pl01x_priv as private data. However, the area of this
> structure has not been reserved.
> This reserves area of struct pl01x_priv by using priv_auto_alloc_size.
>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> ---
>  drivers/serial/serial_pl01x.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
> index 38dda91..90165d7 100644
> --- a/drivers/serial/serial_pl01x.c
> +++ b/drivers/serial/serial_pl01x.c
> @@ -344,6 +344,7 @@ U_BOOT_DRIVER(serial_pl01x) = {
>         .probe = pl01x_serial_probe,
>         .ops    = &pl01x_serial_ops,
>         .flags = DM_FLAG_PRE_RELOC,
> +       .priv_auto_alloc_size = sizeof(struct pl01x_priv),
>  };
>
>  #endif

Sorry that you hit this. The fix has just been applied to u-boot-dm:

http://patchwork.ozlabs.org/patch/414224/

Regards,
Simon
diff mbox

Patch

diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 38dda91..90165d7 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -344,6 +344,7 @@  U_BOOT_DRIVER(serial_pl01x) = {
 	.probe = pl01x_serial_probe,
 	.ops	= &pl01x_serial_ops,
 	.flags = DM_FLAG_PRE_RELOC,
+	.priv_auto_alloc_size = sizeof(struct pl01x_priv),
 };
 
 #endif