Skip to content

Commit 7483189

Browse files
krzkgregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Jiri Slaby <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d3a46d0 commit 7483189

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/tty/serial/samsung_tty.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct s3c24xx_uart_info {
8686

8787
struct s3c24xx_serial_drv_data {
8888
struct s3c24xx_uart_info info;
89-
struct s3c2410_uartcfg *def_cfg;
89+
struct s3c2410_uartcfg def_cfg;
9090
unsigned int fifosize[CONFIG_SERIAL_SAMSUNG_UARTS];
9191
};
9292

@@ -2197,7 +2197,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
21972197
ourport->info = &ourport->drv_data->info;
21982198
ourport->cfg = (dev_get_platdata(&pdev->dev)) ?
21992199
dev_get_platdata(&pdev->dev) :
2200-
ourport->drv_data->def_cfg;
2200+
&ourport->drv_data->def_cfg;
22012201

22022202
switch (ourport->info->type) {
22032203
case TYPE_S3C24XX:
@@ -2629,7 +2629,7 @@ static struct s3c24xx_serial_drv_data s3c2410_serial_drv_data = {
26292629
.clksel_mask = S3C2410_UCON_CLKMASK,
26302630
.clksel_shift = S3C2410_UCON_CLKSHIFT,
26312631
},
2632-
.def_cfg = &(struct s3c2410_uartcfg) {
2632+
.def_cfg = {
26332633
.ucon = S3C2410_UCON_DEFAULT,
26342634
.ufcon = S3C2410_UFCON_DEFAULT,
26352635
},
@@ -2658,7 +2658,7 @@ static struct s3c24xx_serial_drv_data s3c2412_serial_drv_data = {
26582658
.clksel_mask = S3C2412_UCON_CLKMASK,
26592659
.clksel_shift = S3C2412_UCON_CLKSHIFT,
26602660
},
2661-
.def_cfg = &(struct s3c2410_uartcfg) {
2661+
.def_cfg = {
26622662
.ucon = S3C2410_UCON_DEFAULT,
26632663
.ufcon = S3C2410_UFCON_DEFAULT,
26642664
},
@@ -2689,7 +2689,7 @@ static struct s3c24xx_serial_drv_data s3c2440_serial_drv_data = {
26892689
.clksel_shift = S3C2412_UCON_CLKSHIFT,
26902690
.ucon_mask = S3C2440_UCON0_DIVMASK,
26912691
},
2692-
.def_cfg = &(struct s3c2410_uartcfg) {
2692+
.def_cfg = {
26932693
.ucon = S3C2410_UCON_DEFAULT,
26942694
.ufcon = S3C2410_UFCON_DEFAULT,
26952695
},
@@ -2718,7 +2718,7 @@ static struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = {
27182718
.clksel_mask = S3C6400_UCON_CLKMASK,
27192719
.clksel_shift = S3C6400_UCON_CLKSHIFT,
27202720
},
2721-
.def_cfg = &(struct s3c2410_uartcfg) {
2721+
.def_cfg = {
27222722
.ucon = S3C2410_UCON_DEFAULT,
27232723
.ufcon = S3C2410_UFCON_DEFAULT,
27242724
},
@@ -2746,7 +2746,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
27462746
.clksel_mask = S5PV210_UCON_CLKMASK,
27472747
.clksel_shift = S5PV210_UCON_CLKSHIFT,
27482748
},
2749-
.def_cfg = &(struct s3c2410_uartcfg) {
2749+
.def_cfg = {
27502750
.ucon = S5PV210_UCON_DEFAULT,
27512751
.ufcon = S5PV210_UFCON_DEFAULT,
27522752
},
@@ -2775,7 +2775,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
27752775
.clksel_mask = 0, \
27762776
.clksel_shift = 0, \
27772777
}, \
2778-
.def_cfg = &(struct s3c2410_uartcfg) { \
2778+
.def_cfg = { \
27792779
.ucon = S5PV210_UCON_DEFAULT, \
27802780
.ufcon = S5PV210_UFCON_DEFAULT, \
27812781
.has_fracval = 1, \
@@ -2824,7 +2824,7 @@ static struct s3c24xx_serial_drv_data s5l_serial_drv_data = {
28242824
.clksel_mask = 0,
28252825
.clksel_shift = 0,
28262826
},
2827-
.def_cfg = &(struct s3c2410_uartcfg) {
2827+
.def_cfg = {
28282828
.ucon = APPLE_S5L_UCON_DEFAULT,
28292829
.ufcon = S3C2410_UFCON_DEFAULT,
28302830
},

0 commit comments

Comments
 (0)