Skip to content
Commit 8c3cde5d authored by Lukas Wunner's avatar Lukas Wunner Committed by Greg Kroah-Hartman
Browse files

serial: 8250_bcm2835aux: Allocate uart_8250_port on stack



The bcm2835aux UART driver stores a struct uart_8250_port in its private
data even though it's only passed once to serial8250_register_8250_port()
(which copies all relevant data) and becomes obsolete afterwards.
Allocate the struct on the stack instead for simplicity and to conserve
memory.

The driver also initializes a spinlock in the struct which is never used.
Drop that as well.

Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
Cc: Martin Sperl <kernel@martin.sperl.org>
Reviewed-by: default avatarMatthias Brugger <mbrugger@suse.com>
Reviewed-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/421d3aed4c34cc8447ac9c26c320961f1b787f11.1579175223.git.lukas@wunner.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e2f2a994
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment