diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-04-16 11:15:50 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-04-24 13:18:30 +0300 |
commit | 0759a8730c7070299556af8dddeecce90955c8ae (patch) | |
tree | 9265a6c9b98ee379cbc9eb3b063e6954abc04890 /drivers/platform/x86/intel_telemetry_core.c | |
parent | b8da68f44f6dec243a4e9685af0ca0cdc1cd939c (diff) | |
download | linux-0759a8730c7070299556af8dddeecce90955c8ae.tar.xz |
platform/x86: intel_telemetry: Add telemetry_get_pltdata()
Add new function that allows telemetry modules to get pointer to the
platform specific configuration. This is needed to allow the telemetry
debugfs module to fetch PMC IPC instance in the subsequent patch.
This also allows us to replace telemetry_pltconfig_valid() with
telemetry_get_pltdata() as well.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/platform/x86/intel_telemetry_core.c')
-rw-r--r-- | drivers/platform/x86/intel_telemetry_core.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/platform/x86/intel_telemetry_core.c b/drivers/platform/x86/intel_telemetry_core.c index d4040bb222b4..fdf55b5d6948 100644 --- a/drivers/platform/x86/intel_telemetry_core.c +++ b/drivers/platform/x86/intel_telemetry_core.c @@ -353,21 +353,16 @@ int telemetry_clear_pltdata(void) EXPORT_SYMBOL_GPL(telemetry_clear_pltdata); /** - * telemetry_pltconfig_valid() - Checkif platform config is valid + * telemetry_get_pltdata() - Return telemetry platform config * - * Usage by other than telemetry module is invalid - * - * Return: 0 success, < 0 for failure + * May be used by other telemetry modules to get platform specific + * configuration. */ -int telemetry_pltconfig_valid(void) +struct telemetry_plt_config *telemetry_get_pltdata(void) { - if (telm_core_conf.plt_config) - return 0; - - else - return -EINVAL; + return telm_core_conf.plt_config; } -EXPORT_SYMBOL_GPL(telemetry_pltconfig_valid); +EXPORT_SYMBOL_GPL(telemetry_get_pltdata); static inline int telemetry_get_pssevtname(enum telemetry_unit telem_unit, const char **name, int len) |