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: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This commit is contained in:
Vijayavardhan Vennapusa 2016-10-21 15:17:12 +05:30
parent c6b7d9674c
commit 99d25c7fcd
2 changed files with 5 additions and 3 deletions

View file

@ -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;
}

View file

@ -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