platform/x86: dell-smbios: Move request functions for reuse
Move the dell_send_request and dell_fill_request symbols into smbios-base so that they can be used in multiple modules. Signed-off-by: Lyndon Sanche <lsanche@lyndeno.ca> Link: https://lore.kernel.org/r/20240529174843.13226-3-lsanche@lyndeno.ca Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
committed by
Ilpo Järvinen
parent
586d7e4b24
commit
33245680ae
@@ -353,29 +353,6 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
|
||||
{ }
|
||||
};
|
||||
|
||||
static void dell_fill_request(struct calling_interface_buffer *buffer,
|
||||
u32 arg0, u32 arg1, u32 arg2, u32 arg3)
|
||||
{
|
||||
memset(buffer, 0, sizeof(struct calling_interface_buffer));
|
||||
buffer->input[0] = arg0;
|
||||
buffer->input[1] = arg1;
|
||||
buffer->input[2] = arg2;
|
||||
buffer->input[3] = arg3;
|
||||
}
|
||||
|
||||
static int dell_send_request(struct calling_interface_buffer *buffer,
|
||||
u16 class, u16 select)
|
||||
{
|
||||
int ret;
|
||||
|
||||
buffer->cmd_class = class;
|
||||
buffer->cmd_select = select;
|
||||
ret = dell_smbios_call(buffer);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
return dell_smbios_error(buffer->output[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Derived from information in smbios-wireless-ctl:
|
||||
*
|
||||
|
||||
@@ -314,6 +314,31 @@ out_smbios_call:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dell_smbios_call);
|
||||
|
||||
void dell_fill_request(struct calling_interface_buffer *buffer,
|
||||
u32 arg0, u32 arg1, u32 arg2, u32 arg3)
|
||||
{
|
||||
memset(buffer, 0, sizeof(struct calling_interface_buffer));
|
||||
buffer->input[0] = arg0;
|
||||
buffer->input[1] = arg1;
|
||||
buffer->input[2] = arg2;
|
||||
buffer->input[3] = arg3;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dell_fill_request);
|
||||
|
||||
int dell_send_request(struct calling_interface_buffer *buffer,
|
||||
u16 class, u16 select)
|
||||
{
|
||||
int ret;
|
||||
|
||||
buffer->cmd_class = class;
|
||||
buffer->cmd_select = select;
|
||||
ret = dell_smbios_call(buffer);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
return dell_smbios_error(buffer->output[0]);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dell_send_request);
|
||||
|
||||
struct calling_interface_token *dell_smbios_find_token(int tokenid)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -64,6 +64,11 @@ int dell_smbios_call_filter(struct device *d,
|
||||
struct calling_interface_buffer *buffer);
|
||||
int dell_smbios_call(struct calling_interface_buffer *buffer);
|
||||
|
||||
void dell_fill_request(struct calling_interface_buffer *buffer,
|
||||
u32 arg0, u32 arg1, u32 arg2, u32 arg3);
|
||||
int dell_send_request(struct calling_interface_buffer *buffer,
|
||||
u16 class, u16 select);
|
||||
|
||||
struct calling_interface_token *dell_smbios_find_token(int tokenid);
|
||||
|
||||
enum dell_laptop_notifier_actions {
|
||||
|
||||
Reference in New Issue
Block a user