hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/platform/x86/intel_telemetry_core.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Intel SoC Core Telemetry Driver
34 * Copyright (C) 2015, Intel Corporation.
45 * All Rights Reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
146 *
157 * Telemetry Framework provides platform related PM and performance statistics.
168 * This file provides the core telemetry API implementation.
....@@ -361,21 +353,16 @@
361353 EXPORT_SYMBOL_GPL(telemetry_clear_pltdata);
362354
363355 /**
364
- * telemetry_pltconfig_valid() - Checkif platform config is valid
356
+ * telemetry_get_pltdata() - Return telemetry platform config
365357 *
366
- * Usage by other than telemetry module is invalid
367
- *
368
- * Return: 0 success, < 0 for failure
358
+ * May be used by other telemetry modules to get platform specific
359
+ * configuration.
369360 */
370
-int telemetry_pltconfig_valid(void)
361
+struct telemetry_plt_config *telemetry_get_pltdata(void)
371362 {
372
- if (telm_core_conf.plt_config)
373
- return 0;
374
-
375
- else
376
- return -EINVAL;
363
+ return telm_core_conf.plt_config;
377364 }
378
-EXPORT_SYMBOL_GPL(telemetry_pltconfig_valid);
365
+EXPORT_SYMBOL_GPL(telemetry_get_pltdata);
379366
380367 static inline int telemetry_get_pssevtname(enum telemetry_unit telem_unit,
381368 const char **name, int len)
....@@ -460,4 +447,4 @@
460447
461448 MODULE_AUTHOR("Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>");
462449 MODULE_DESCRIPTION("Intel SoC Telemetry Interface");
463
-MODULE_LICENSE("GPL");
450
+MODULE_LICENSE("GPL v2");