Skip to content

Commit

Permalink
serial: tegra: use NULL instead of 0
Browse files Browse the repository at this point in the history
'cons' is a pointer; thus NULL should be used instead of 0.
Also, local symbols are staticized.
Fix the following sparse warnings:

drivers/tty/serial/serial-tegra.c:1209:27: warning: Using plain integer as NULL pointer
drivers/tty/serial/serial-tegra.c:1240:29: warning: symbol 'tegra20_uart_chip_data' was not declared. Should it be static?
drivers/tty/serial/serial-tegra.c:1246:29: warning: symbol 'tegra30_uart_chip_data' was not declared. Should it be static?

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jingoo Han authored and Greg Kroah-Hartman committed Aug 12, 2013
1 parent 4f749f2 commit fbf3ab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/serial/serial-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ static struct uart_driver tegra_uart_driver = {
.owner = THIS_MODULE,
.driver_name = "tegra_hsuart",
.dev_name = "ttyTHS",
.cons = 0,
.cons = NULL,
.nr = TEGRA_UART_MAXIMUM,
};

Expand Down Expand Up @@ -1237,13 +1237,13 @@ static int tegra_uart_parse_dt(struct platform_device *pdev,
return 0;
}

struct tegra_uart_chip_data tegra20_uart_chip_data = {
static struct tegra_uart_chip_data tegra20_uart_chip_data = {
.tx_fifo_full_status = false,
.allow_txfifo_reset_fifo_mode = true,
.support_clk_src_div = false,
};

struct tegra_uart_chip_data tegra30_uart_chip_data = {
static struct tegra_uart_chip_data tegra30_uart_chip_data = {
.tx_fifo_full_status = true,
.allow_txfifo_reset_fifo_mode = false,
.support_clk_src_div = true,
Expand Down

0 comments on commit fbf3ab2

Please sign in to comment.