summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2022-03-08 09:09:13 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-18 13:18:59 +0100
commit7483189d6b3c1dec7e91fa082a4d52cfc9dd1ef0 (patch)
tree8de2879a7435dedd4f5d9f6eb85477076a0d7142 /drivers/tty
parentd3a46d0d83f94b5780bcaaea4b4ddbe7c110b35c (diff)
downloadlinux-stable-7483189d6b3c1dec7e91fa082a4d52cfc9dd1ef0.tar.gz
linux-stable-7483189d6b3c1dec7e91fa082a4d52cfc9dd1ef0.tar.bz2
linux-stable-7483189d6b3c1dec7e91fa082a4d52cfc9dd1ef0.zip
tty: serial: samsung: embed s3c2410_uartcfg in parent structure
Embed "struct s3c2410_uartcfg" directly as a member of "struct s3c24xx_serial_drv_data" instead of keeping it as a pointer. This makes the code clearer (obvious ownership of "s3c2410_uartcfg s3c24xx_serial_drv_data") and saves one pointer. Tested-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20220308080919.152715-3-krzysztof.kozlowski@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/samsung_tty.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 966398df4b6a..40209461c574 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -86,7 +86,7 @@ struct s3c24xx_uart_info {
struct s3c24xx_serial_drv_data {
struct s3c24xx_uart_info info;
- struct s3c2410_uartcfg *def_cfg;
+ struct s3c2410_uartcfg def_cfg;
unsigned int fifosize[CONFIG_SERIAL_SAMSUNG_UARTS];
};
@@ -2197,7 +2197,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
ourport->info = &ourport->drv_data->info;
ourport->cfg = (dev_get_platdata(&pdev->dev)) ?
dev_get_platdata(&pdev->dev) :
- ourport->drv_data->def_cfg;
+ &ourport->drv_data->def_cfg;
switch (ourport->info->type) {
case TYPE_S3C24XX:
@@ -2629,7 +2629,7 @@ static struct s3c24xx_serial_drv_data s3c2410_serial_drv_data = {
.clksel_mask = S3C2410_UCON_CLKMASK,
.clksel_shift = S3C2410_UCON_CLKSHIFT,
},
- .def_cfg = &(struct s3c2410_uartcfg) {
+ .def_cfg = {
.ucon = S3C2410_UCON_DEFAULT,
.ufcon = S3C2410_UFCON_DEFAULT,
},
@@ -2658,7 +2658,7 @@ static struct s3c24xx_serial_drv_data s3c2412_serial_drv_data = {
.clksel_mask = S3C2412_UCON_CLKMASK,
.clksel_shift = S3C2412_UCON_CLKSHIFT,
},
- .def_cfg = &(struct s3c2410_uartcfg) {
+ .def_cfg = {
.ucon = S3C2410_UCON_DEFAULT,
.ufcon = S3C2410_UFCON_DEFAULT,
},
@@ -2689,7 +2689,7 @@ static struct s3c24xx_serial_drv_data s3c2440_serial_drv_data = {
.clksel_shift = S3C2412_UCON_CLKSHIFT,
.ucon_mask = S3C2440_UCON0_DIVMASK,
},
- .def_cfg = &(struct s3c2410_uartcfg) {
+ .def_cfg = {
.ucon = S3C2410_UCON_DEFAULT,
.ufcon = S3C2410_UFCON_DEFAULT,
},
@@ -2718,7 +2718,7 @@ static struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = {
.clksel_mask = S3C6400_UCON_CLKMASK,
.clksel_shift = S3C6400_UCON_CLKSHIFT,
},
- .def_cfg = &(struct s3c2410_uartcfg) {
+ .def_cfg = {
.ucon = S3C2410_UCON_DEFAULT,
.ufcon = S3C2410_UFCON_DEFAULT,
},
@@ -2746,7 +2746,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
.clksel_mask = S5PV210_UCON_CLKMASK,
.clksel_shift = S5PV210_UCON_CLKSHIFT,
},
- .def_cfg = &(struct s3c2410_uartcfg) {
+ .def_cfg = {
.ucon = S5PV210_UCON_DEFAULT,
.ufcon = S5PV210_UFCON_DEFAULT,
},
@@ -2775,7 +2775,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
.clksel_mask = 0, \
.clksel_shift = 0, \
}, \
- .def_cfg = &(struct s3c2410_uartcfg) { \
+ .def_cfg = { \
.ucon = S5PV210_UCON_DEFAULT, \
.ufcon = S5PV210_UFCON_DEFAULT, \
.has_fracval = 1, \
@@ -2824,7 +2824,7 @@ static struct s3c24xx_serial_drv_data s5l_serial_drv_data = {
.clksel_mask = 0,
.clksel_shift = 0,
},
- .def_cfg = &(struct s3c2410_uartcfg) {
+ .def_cfg = {
.ucon = APPLE_S5L_UCON_DEFAULT,
.ufcon = S3C2410_UFCON_DEFAULT,
},