Skip to content

Commit a6149f7

Browse files
andredgregkh
authored andcommitted
tty: serial: samsung_tty: remove dead code
When support for various old platforms was removed in commit 1ea35b3 ("ARM: s3c: remove s3c24xx specific hacks"), s3c24xx_serial_ops also became unused here because nothing sets port type TYPE_S3C24XX anymore. Remove s3c24xx_serial_ops and all the code that's unreachable now. Fixes: 1ea35b3 ("ARM: s3c: remove s3c24xx specific hacks") Signed-off-by: André Draszik <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Sam Protsenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 838eb76 commit a6149f7

File tree

1 file changed

+0
-105
lines changed

1 file changed

+0
-105
lines changed

drivers/tty/serial/samsung_tty.c

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#define RXSTAT_DUMMY_READ (0x10000000)
6565

6666
enum s3c24xx_port_type {
67-
TYPE_S3C24XX,
6867
TYPE_S3C6400,
6968
TYPE_APPLE_S5L,
7069
};
@@ -128,8 +127,6 @@ struct s3c24xx_uart_dma {
128127
};
129128

130129
struct s3c24xx_uart_port {
131-
unsigned char rx_claimed;
132-
unsigned char tx_claimed;
133130
unsigned char rx_enabled;
134131
unsigned char tx_enabled;
135132
unsigned int pm_level;
@@ -1166,29 +1163,6 @@ static void s3c24xx_serial_release_dma(struct s3c24xx_uart_port *p)
11661163
}
11671164
}
11681165

1169-
static void s3c24xx_serial_shutdown(struct uart_port *port)
1170-
{
1171-
struct s3c24xx_uart_port *ourport = to_ourport(port);
1172-
1173-
if (ourport->tx_claimed) {
1174-
free_irq(ourport->tx_irq, ourport);
1175-
ourport->tx_enabled = 0;
1176-
ourport->tx_claimed = 0;
1177-
ourport->tx_mode = 0;
1178-
}
1179-
1180-
if (ourport->rx_claimed) {
1181-
free_irq(ourport->rx_irq, ourport);
1182-
ourport->rx_claimed = 0;
1183-
ourport->rx_enabled = 0;
1184-
}
1185-
1186-
if (ourport->dma)
1187-
s3c24xx_serial_release_dma(ourport);
1188-
1189-
ourport->tx_in_progress = 0;
1190-
}
1191-
11921166
static void s3c64xx_serial_shutdown(struct uart_port *port)
11931167
{
11941168
struct s3c24xx_uart_port *ourport = to_ourport(port);
@@ -1234,48 +1208,6 @@ static void apple_s5l_serial_shutdown(struct uart_port *port)
12341208
ourport->tx_in_progress = 0;
12351209
}
12361210

1237-
static int s3c24xx_serial_startup(struct uart_port *port)
1238-
{
1239-
struct s3c24xx_uart_port *ourport = to_ourport(port);
1240-
int ret;
1241-
1242-
ourport->rx_enabled = 1;
1243-
1244-
ret = request_irq(ourport->rx_irq, s3c24xx_serial_rx_irq, 0,
1245-
s3c24xx_serial_portname(port), ourport);
1246-
1247-
if (ret != 0) {
1248-
dev_err(port->dev, "cannot get irq %d\n", ourport->rx_irq);
1249-
return ret;
1250-
}
1251-
1252-
ourport->rx_claimed = 1;
1253-
1254-
dev_dbg(port->dev, "requesting tx irq...\n");
1255-
1256-
ourport->tx_enabled = 1;
1257-
1258-
ret = request_irq(ourport->tx_irq, s3c24xx_serial_tx_irq, 0,
1259-
s3c24xx_serial_portname(port), ourport);
1260-
1261-
if (ret) {
1262-
dev_err(port->dev, "cannot get irq %d\n", ourport->tx_irq);
1263-
goto err;
1264-
}
1265-
1266-
ourport->tx_claimed = 1;
1267-
1268-
/* the port reset code should have done the correct
1269-
* register setup for the port controls
1270-
*/
1271-
1272-
return ret;
1273-
1274-
err:
1275-
s3c24xx_serial_shutdown(port);
1276-
return ret;
1277-
}
1278-
12791211
static int s3c64xx_serial_startup(struct uart_port *port)
12801212
{
12811213
struct s3c24xx_uart_port *ourport = to_ourport(port);
@@ -1692,8 +1624,6 @@ static const char *s3c24xx_serial_type(struct uart_port *port)
16921624
const struct s3c24xx_uart_port *ourport = to_ourport(port);
16931625

16941626
switch (ourport->info->type) {
1695-
case TYPE_S3C24XX:
1696-
return "S3C24XX";
16971627
case TYPE_S3C6400:
16981628
return "S3C6400/10";
16991629
case TYPE_APPLE_S5L:
@@ -1753,27 +1683,6 @@ static void s3c24xx_serial_put_poll_char(struct uart_port *port,
17531683
unsigned char c);
17541684
#endif
17551685

1756-
static const struct uart_ops s3c24xx_serial_ops = {
1757-
.pm = s3c24xx_serial_pm,
1758-
.tx_empty = s3c24xx_serial_tx_empty,
1759-
.get_mctrl = s3c24xx_serial_get_mctrl,
1760-
.set_mctrl = s3c24xx_serial_set_mctrl,
1761-
.stop_tx = s3c24xx_serial_stop_tx,
1762-
.start_tx = s3c24xx_serial_start_tx,
1763-
.stop_rx = s3c24xx_serial_stop_rx,
1764-
.break_ctl = s3c24xx_serial_break_ctl,
1765-
.startup = s3c24xx_serial_startup,
1766-
.shutdown = s3c24xx_serial_shutdown,
1767-
.set_termios = s3c24xx_serial_set_termios,
1768-
.type = s3c24xx_serial_type,
1769-
.config_port = s3c24xx_serial_config_port,
1770-
.verify_port = s3c24xx_serial_verify_port,
1771-
#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_CONSOLE_POLL)
1772-
.poll_get_char = s3c24xx_serial_get_poll_char,
1773-
.poll_put_char = s3c24xx_serial_put_poll_char,
1774-
#endif
1775-
};
1776-
17771686
static const struct uart_ops s3c64xx_serial_ops = {
17781687
.pm = s3c24xx_serial_pm,
17791688
.tx_empty = s3c24xx_serial_tx_empty,
@@ -1836,7 +1745,6 @@ static void s3c24xx_serial_init_port_default(int index) {
18361745
port->iotype = UPIO_MEM;
18371746
port->uartclk = 0;
18381747
port->fifosize = 16;
1839-
port->ops = &s3c24xx_serial_ops;
18401748
port->flags = UPF_BOOT_AUTOCONF;
18411749
port->line = index;
18421750
}
@@ -1954,16 +1862,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
19541862
ourport->tx_irq = ret + 1;
19551863
}
19561864

1957-
switch (ourport->info->type) {
1958-
case TYPE_S3C24XX:
1959-
ret = platform_get_irq(platdev, 1);
1960-
if (ret > 0)
1961-
ourport->tx_irq = ret;
1962-
break;
1963-
default:
1964-
break;
1965-
}
1966-
19671865
/*
19681866
* DMA is currently supported only on DT platforms, if DMA properties
19691867
* are specified.
@@ -2083,9 +1981,6 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
20831981
&ourport->drv_data->def_cfg;
20841982

20851983
switch (ourport->info->type) {
2086-
case TYPE_S3C24XX:
2087-
ourport->port.ops = &s3c24xx_serial_ops;
2088-
break;
20891984
case TYPE_S3C6400:
20901985
ourport->port.ops = &s3c64xx_serial_ops;
20911986
break;

0 commit comments

Comments
 (0)