Merge "defconfig: msmcortex: Enable FG_GEN3 driver"

This commit is contained in:
Linux Build Service Account 2016-07-27 19:27:16 -07:00 committed by Gerrit - the friendly Code Review server
commit 006d8efe02
3 changed files with 7 additions and 5 deletions

View file

@ -304,6 +304,7 @@ CONFIG_MSM_PM=y
CONFIG_APSS_CORE_EA=y
CONFIG_MSM_APM=y
CONFIG_QPNP_SMBCHARGER=y
CONFIG_QPNP_FG_GEN3=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1351_USB_CHARGER=y
CONFIG_MSM_BCL_CTL=y

View file

@ -307,6 +307,7 @@ CONFIG_MSM_PM=y
CONFIG_APSS_CORE_EA=y
CONFIG_MSM_APM=y
CONFIG_QPNP_SMBCHARGER=y
CONFIG_QPNP_FG_GEN3=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1351_USB_CHARGER=y
CONFIG_MSM_BCL_CTL=y

View file

@ -384,7 +384,7 @@ static int print_to_log(struct fg_log_buffer *log, const char *fmt, ...)
static int write_next_line_to_log(struct fg_trans *trans, int offset,
size_t *pcnt)
{
int i, j;
int i;
u8 data[ITEMS_PER_LINE];
u16 address;
struct fg_log_buffer *log = trans->log;
@ -397,7 +397,6 @@ static int write_next_line_to_log(struct fg_trans *trans, int offset,
goto done;
memcpy(data, trans->data + (offset - trans->addr), items_to_read);
*pcnt -= items_to_read;
/* address is in word now and it increments by 1. */
@ -407,8 +406,8 @@ static int write_next_line_to_log(struct fg_trans *trans, int offset,
goto done;
/* Log the data items */
for (j = 0; i < items_to_log; ++i, ++j) {
cnt = print_to_log(log, "%2.2X ", data[j]);
for (i = 0; i < items_to_log; ++i) {
cnt = print_to_log(log, "%2.2X ", data[i]);
if (cnt == 0)
goto done;
}
@ -552,7 +551,8 @@ static ssize_t fg_sram_dfs_reg_write(struct file *file, const char __user *buf,
values = kbuf;
/* Parse the data in the buffer. It should be a string of numbers */
while (sscanf(kbuf + pos, "%i%n", &data, &bytes_read) == 1) {
while ((pos < count) &&
sscanf(kbuf + pos, "%i%n", &data, &bytes_read) == 1) {
pos += bytes_read;
values[cnt++] = data & 0xff;
}