Commit 3cab7fd9 authored by Matthew Garrett's avatar Matthew Garrett Committed by Linus Torvalds

dcdbas: export functionality for use in other drivers

The dcdbas code allows calls to be made into the firmware on Dell systems.
 Exporting this to other drivers allows them to implement Dell-specific
functionality in a safe way.
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f06295b4
...@@ -238,11 +238,11 @@ static ssize_t host_control_on_shutdown_store(struct device *dev, ...@@ -238,11 +238,11 @@ static ssize_t host_control_on_shutdown_store(struct device *dev,
} }
/** /**
* smi_request: generate SMI request * dcdbas_smi_request: generate SMI request
* *
* Called with smi_data_lock. * Called with smi_data_lock.
*/ */
static int smi_request(struct smi_cmd *smi_cmd) int dcdbas_smi_request(struct smi_cmd *smi_cmd)
{ {
cpumask_t old_mask; cpumask_t old_mask;
int ret = 0; int ret = 0;
...@@ -309,14 +309,14 @@ static ssize_t smi_request_store(struct device *dev, ...@@ -309,14 +309,14 @@ static ssize_t smi_request_store(struct device *dev,
switch (val) { switch (val) {
case 2: case 2:
/* Raw SMI */ /* Raw SMI */
ret = smi_request(smi_cmd); ret = dcdbas_smi_request(smi_cmd);
if (!ret) if (!ret)
ret = count; ret = count;
break; break;
case 1: case 1:
/* Calling Interface SMI */ /* Calling Interface SMI */
smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer); smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer);
ret = smi_request(smi_cmd); ret = dcdbas_smi_request(smi_cmd);
if (!ret) if (!ret)
ret = count; ret = count;
break; break;
...@@ -333,6 +333,7 @@ static ssize_t smi_request_store(struct device *dev, ...@@ -333,6 +333,7 @@ static ssize_t smi_request_store(struct device *dev,
mutex_unlock(&smi_data_lock); mutex_unlock(&smi_data_lock);
return ret; return ret;
} }
EXPORT_SYMBOL(dcdbas_smi_request);
/** /**
* host_control_smi: generate host control SMI * host_control_smi: generate host control SMI
......
...@@ -101,5 +101,7 @@ struct apm_cmd { ...@@ -101,5 +101,7 @@ struct apm_cmd {
} __attribute__ ((packed)) parameters; } __attribute__ ((packed)) parameters;
} __attribute__ ((packed)); } __attribute__ ((packed));
int dcdbas_smi_request(struct smi_cmd *smi_cmd);
#endif /* _DCDBAS_H_ */ #endif /* _DCDBAS_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment