Revert "(CR) sx937x: change global_sx937x initialization position"

This reverts commit 3663cf0b4334e402577e63a4a04a2be39c64ffa9.

Change-Id: I4252469c9bd9c0820bbf8c3d6c4fbfd233bb2946
Reviewed-on: https://gerrit.mot.com/1991077
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Jiyue Cui 2021-06-24 09:01:18 -05:00
commit 409613e8c7

View file

@ -1371,7 +1371,6 @@ static int sx937x_probe(struct i2c_client *client, const struct i2c_device_id *i
}
this = devm_kzalloc(&client->dev,sizeof(sx93XX_t), GFP_KERNEL); /* create memory for main struct */
global_sx937x = this;
LOG_DBG("Initialized Main Memory: 0x%p\n",this);
pButtonInformationData = devm_kzalloc(&client->dev , sizeof(struct totalButtonInformation), GFP_KERNEL);
@ -1612,6 +1611,8 @@ static int sx937x_probe(struct i2c_client *client, const struct i2c_device_id *i
//return -1;
}
global_sx937x = this;
if(pplatData->reinit_on_i2c_failure) {
INIT_DELAYED_WORK(&this->i2c_watchdog_work, sx937x_i2c_watchdog_work);
schedule_delayed_work(&this->i2c_watchdog_work,