mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 15:14:52 +00:00

Adds lenovo-wmi-helpers, which provides a common wrapper function for wmidev_evaluate_method that does data validation and error handling. Reviewed-by: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com> Link: https://lore.kernel.org/r/20250702033826.1057762-3-derekjohn.clark@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
21 lines
450 B
C
21 lines
450 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/* Copyright (C) 2025 Derek J. Clark <derekjohn.clark@gmail.com> */
|
|
|
|
#ifndef _LENOVO_WMI_HELPERS_H_
|
|
#define _LENOVO_WMI_HELPERS_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct wmi_device;
|
|
|
|
struct wmi_method_args_32 {
|
|
u32 arg0;
|
|
u32 arg1;
|
|
};
|
|
|
|
int lwmi_dev_evaluate_int(struct wmi_device *wdev, u8 instance, u32 method_id,
|
|
unsigned char *buf, size_t size, u32 *retval);
|
|
|
|
#endif /* !_LENOVO_WMI_HELPERS_H_ */
|