mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "soc: swr-mstr: update logic to dump soundwire register"
This commit is contained in:
commit
8f873b516f
1 changed files with 1 additions and 6 deletions
|
|
@ -226,16 +226,11 @@ static ssize_t swrm_reg_show(struct swr_mstr_ctrl *swrm, char __user *ubuf,
|
|||
int i, reg_val, len;
|
||||
ssize_t total = 0;
|
||||
char tmp_buf[SWR_MSTR_MAX_BUF_LEN];
|
||||
int rem = 0;
|
||||
|
||||
if (!ubuf || !ppos)
|
||||
return 0;
|
||||
|
||||
i = ((int) *ppos + SWRM_BASE);
|
||||
rem = i%4;
|
||||
|
||||
if (rem)
|
||||
i = (i - rem);
|
||||
|
||||
for (; i <= SWRM_MAX_REGISTER; i += 4) {
|
||||
usleep_range(100, 150);
|
||||
|
|
@ -253,7 +248,7 @@ static ssize_t swrm_reg_show(struct swr_mstr_ctrl *swrm, char __user *ubuf,
|
|||
total = -EFAULT;
|
||||
goto copy_err;
|
||||
}
|
||||
*ppos += len;
|
||||
*ppos += 4;
|
||||
total += len;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue