eud: Set pdev->id value to 0 and add set_mctrl() API
pdev->id is needed to reference port with serial core framework. Also serial core framework assumes that set_mctrl() ops is must to support. Hence add set_mctrl() API to avoid null pointer related crash within serial core framework. Change-Id: Ida4ec2622232b822f1100e9c4ce0e8d3bd0d29c9 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
43ee86678a
commit
78cab5d31b
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
@ -286,6 +286,11 @@ static unsigned int eud_tx_empty(struct uart_port *port)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void eud_set_mctrl(struct uart_port *port, unsigned int mctrl)
|
||||||
|
{
|
||||||
|
/* Nothing to set */
|
||||||
|
}
|
||||||
|
|
||||||
static void eud_stop_tx(struct uart_port *port)
|
static void eud_stop_tx(struct uart_port *port)
|
||||||
{
|
{
|
||||||
/* Disable Tx interrupt */
|
/* Disable Tx interrupt */
|
||||||
@ -365,6 +370,7 @@ static int eud_verify_port(struct uart_port *port,
|
|||||||
/* serial functions supported */
|
/* serial functions supported */
|
||||||
static const struct uart_ops eud_uart_ops = {
|
static const struct uart_ops eud_uart_ops = {
|
||||||
.tx_empty = eud_tx_empty,
|
.tx_empty = eud_tx_empty,
|
||||||
|
.set_mctrl = eud_set_mctrl,
|
||||||
.stop_tx = eud_stop_tx,
|
.stop_tx = eud_stop_tx,
|
||||||
.start_tx = eud_start_tx,
|
.start_tx = eud_start_tx,
|
||||||
.stop_rx = eud_stop_rx,
|
.stop_rx = eud_stop_rx,
|
||||||
@ -593,6 +599,7 @@ static int msm_eud_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
INIT_WORK(&chip->eud_work, eud_event_notifier);
|
INIT_WORK(&chip->eud_work, eud_event_notifier);
|
||||||
|
|
||||||
|
pdev->id = 0;
|
||||||
port = &chip->port;
|
port = &chip->port;
|
||||||
port->line = pdev->id;
|
port->line = pdev->id;
|
||||||
port->type = PORT_EUD_UART;
|
port->type = PORT_EUD_UART;
|
||||||
|
Loading…
Reference in New Issue
Block a user