From 3cab7fd964916a5474dcaeb23b6723fbfb34cc66 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Wed, 7 Jan 2009 18:08:54 -0800 Subject: 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: Matthew Garrett Cc: Matt Domsch Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/firmware/dcdbas.c | 9 +++++---- drivers/firmware/dcdbas.h | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/firmware') diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index 50a071f1c945..777fba48d2d3 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c @@ -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. */ -static int smi_request(struct smi_cmd *smi_cmd) +int dcdbas_smi_request(struct smi_cmd *smi_cmd) { cpumask_t old_mask; int ret = 0; @@ -309,14 +309,14 @@ static ssize_t smi_request_store(struct device *dev, switch (val) { case 2: /* Raw SMI */ - ret = smi_request(smi_cmd); + ret = dcdbas_smi_request(smi_cmd); if (!ret) ret = count; break; case 1: /* Calling Interface SMI */ smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer); - ret = smi_request(smi_cmd); + ret = dcdbas_smi_request(smi_cmd); if (!ret) ret = count; break; @@ -333,6 +333,7 @@ out: mutex_unlock(&smi_data_lock); return ret; } +EXPORT_SYMBOL(dcdbas_smi_request); /** * host_control_smi: generate host control SMI diff --git a/drivers/firmware/dcdbas.h b/drivers/firmware/dcdbas.h index 87bc3417de27..ca3cb0a54ab6 100644 --- a/drivers/firmware/dcdbas.h +++ b/drivers/firmware/dcdbas.h @@ -101,5 +101,7 @@ struct apm_cmd { } __attribute__ ((packed)) parameters; } __attribute__ ((packed)); +int dcdbas_smi_request(struct smi_cmd *smi_cmd); + #endif /* _DCDBAS_H_ */ -- cgit v1.2.3