From 409613e8c712f269ee8b887a84f58c3cf86b483b Mon Sep 17 00:00:00 2001 From: Jiyue Cui Date: Thu, 24 Jun 2021 09:01:18 -0500 Subject: [PATCH] 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 Submit-Approved: Jira Key --- drivers/misc/sx937x/sx937x_sar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/sx937x/sx937x_sar.c b/drivers/misc/sx937x/sx937x_sar.c index 2e47d1586879..804f24da791e 100644 --- a/drivers/misc/sx937x/sx937x_sar.c +++ b/drivers/misc/sx937x/sx937x_sar.c @@ -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,