From: Pan Li <incarnation.p....@outlook.com> Convert type le16 to cpu of argument 1 in function pd_header_cnt.
Signed-off-by: Pan Li <incarnation.p....@outlook.com> --- drivers/staging/typec/tcpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index df72d8b..405c9cc 100644 --- a/drivers/staging/typec/tcpci.c +++ b/drivers/staging/typec/tcpci.c @@ -287,7 +287,7 @@ static int tcpci_pd_transmit(struct tcpc_dev *tcpc, unsigned int reg, cnt, header; int ret; - cnt = msg ? pd_header_cnt(msg->header) * 4 : 0; + cnt = msg ? pd_header_cnt(le16_to_cpu(msg->header)) * 4 : 0; ret = regmap_write(tcpci->regmap, TCPC_TX_BYTE_CNT, cnt + 2); if (ret < 0) return ret; -- 1.9.1 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel