bos0614_mmi: fix alignment issue

Structure alignment and missing data initialization allowed for
improperly populated value.

Change-Id: Iab8c395452db159415cf3052e7a7590770d8ae5f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1962683
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Konstantin Makariev 2021-05-27 12:08:51 -05:00 • committed by Konstantin Makariev
commit 7a6de0ddde

View file

@ -294,7 +294,7 @@ static ssize_t setSynthSlice(struct device *dev,
if (ctx != NULL && ctx->hapticDriver != NULL)
{
HapticDriver *driver = ctx->hapticDriver;
SynthSlice slice;
SynthSlice slice = {0};
uint8_t outputChannel = 0;
size_t paramLength = 0;
uint8_t shape = 0;
@ -470,7 +470,7 @@ static ssize_t setSensingConfig(struct device *dev,
if (ctx != NULL && ctx->hapticDriver != NULL)
{
HapticDriver *driver = ctx->hapticDriver;
SensingConfig config;
SensingConfig config = {0};
ChannelId channelId = 0;
size_t paramLength = 0;
const char *directionS;
@ -497,7 +497,7 @@ static ssize_t setSensingConfig(struct device *dev,
if (directionS != NULL && modeS != NULL &&
driver->buttonSensing(driver, channelId, config) &&
ctx->hapticDriver->configGPO(ctx->hapticDriver, channelId, GPO_BUTTON_STATE))
driver->configGPO(driver, channelId, GPO_BUTTON_STATE))
{
dev_dbg(ctx->dev,
"[Sensing config] Success Channel #: %d Mode: %s Direction: %s Debouncing Duration: %d microS Threshold: %d Stabilization Duration: %d ms\n",