diff options
author | Rasmus Villemoes <ravi@prevas.dk> | 2024-10-03 16:10:29 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-16 15:54:31 -0600 |
commit | 6cc6a2f6992ebe0c087a0da29d1ded3f8799d6ca (patch) | |
tree | f8f124b0e0c010d4c9c03587f12a921e6ddff6b6 /drivers/timer/tsc_timer.c | |
parent | 32822982307d3f4288580fe2f3b25e5031900702 (diff) |
serial: embed the rx buffer in struct serial_dev_priv
The initialization of upriv->buf doesn't check for a NULL return. But
there's actually no point in doing a separate, unconditional malloc()
in post_probe; we can just make serial_dev_priv contain the rx buffer
itself, and let the (larger) allocation be handled by the driver core
when it allocates the ->per_device_auto. The total run-time memory
used is mostly the same, we reduce the code size a little, and as a
bonus, struct serial_dev_priv does not contain the unused members when
!SERIAL_RX_BUFFER.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/timer/tsc_timer.c')
0 files changed, 0 insertions, 0 deletions