diff options
author | Srinivas Pandruvada <[email protected]> | 2023-06-12 15:40:33 -0700 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-06-13 12:35:00 +0200 |
commit | b77b75fc61216cfaa974a8241186635eabe6671a (patch) | |
tree | f12b3db8e20eec026a6c6765668104fad325f8c6 | |
parent | fa5e68b1c10d56befcee2ee0a9e1eed2c830e352 (diff) |
platform/x86: ISST: Fix usage counter
On multi package system, the TPMI SST instance is getting allocated
again as the usage counter is not getting incremented. Here the
instance is allocated only when the usage count is zero. There is
no need to allocate again.
Increment usage ID on successful return from isst_if_cdev_register().
Signed-off-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r-- | drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c index 664d2ee60385..63faa2ea8327 100644 --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c @@ -1414,6 +1414,8 @@ int tpmi_sst_init(void) ret = isst_if_cdev_register(ISST_IF_DEV_TPMI, &cb); if (ret) kfree(isst_common.sst_inst); + else + ++isst_core_usage_count; init_done: mutex_unlock(&isst_tpmi_dev_lock); return ret; |