Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99d25c7f authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USB: pd: Fix compilation issues for 32 bit support



Compilation errors are seen from qpnp-pdphy.c and policy_engine.c
drivers, when try to compile for 32 bit support. Hence fix those
errors for 32 bit support getting compiled successfully.

Change-Id: I0c496a73feb83c640f9a135f98ec393d1096b205
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent c6b7d967
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ static void phy_msg_received(struct usbpd *pd, enum pd_msg_type type,
	}

	if (len < 2) {
		usbpd_err(&pd->dev, "invalid message received, len=%ld\n", len);
		usbpd_err(&pd->dev, "invalid message received, len=%zd\n", len);
		return;
	}

@@ -547,7 +547,7 @@ static void phy_msg_received(struct usbpd *pd, enum pd_msg_type type,
	len -= sizeof(u16);

	if (len % 4 != 0) {
		usbpd_err(&pd->dev, "len=%ld not multiple of 4\n", len);
		usbpd_err(&pd->dev, "len=%zd not multiple of 4\n", len);
		return;
	}

@@ -566,7 +566,7 @@ static void phy_msg_received(struct usbpd *pd, enum pd_msg_type type,

	/* check header's count field to see if it matches len */
	if (PD_MSG_HDR_COUNT(header) != (len / 4)) {
		usbpd_err(&pd->dev, "header count (%d) mismatch, len=%ld\n",
		usbpd_err(&pd->dev, "header count (%d) mismatch, len=%zd\n",
				PD_MSG_HDR_COUNT(header), len);
		return;
	}
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@
#include <linux/of_irq.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include "usbpd.h"

#define USB_PDPHY_MAX_DATA_OBJ_LEN	28