diff options
author | Matthew Garrett <mjg59@srcf.ucam.org> | 2009-01-07 21:08:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:12 -0500 |
commit | 3cab7fd964916a5474dcaeb23b6723fbfb34cc66 (patch) | |
tree | bdc3624a1a821e0d93a2abc5aa1c2918ccc4e62b /drivers | |
parent | f06295b44c296c8fb08823a3118468ae343b60f2 (diff) |
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 <mjg@redhat.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firmware/dcdbas.c | 9 | ||||
-rw-r--r-- | drivers/firmware/dcdbas.h | 2 |
2 files changed, 7 insertions, 4 deletions
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, | |||
238 | } | 238 | } |
239 | 239 | ||
240 | /** | 240 | /** |
241 | * smi_request: generate SMI request | 241 | * dcdbas_smi_request: generate SMI request |
242 | * | 242 | * |
243 | * Called with smi_data_lock. | 243 | * Called with smi_data_lock. |
244 | */ | 244 | */ |
245 | static int smi_request(struct smi_cmd *smi_cmd) | 245 | int dcdbas_smi_request(struct smi_cmd *smi_cmd) |
246 | { | 246 | { |
247 | cpumask_t old_mask; | 247 | cpumask_t old_mask; |
248 | int ret = 0; | 248 | int ret = 0; |
@@ -309,14 +309,14 @@ static ssize_t smi_request_store(struct device *dev, | |||
309 | switch (val) { | 309 | switch (val) { |
310 | case 2: | 310 | case 2: |
311 | /* Raw SMI */ | 311 | /* Raw SMI */ |
312 | ret = smi_request(smi_cmd); | 312 | ret = dcdbas_smi_request(smi_cmd); |
313 | if (!ret) | 313 | if (!ret) |
314 | ret = count; | 314 | ret = count; |
315 | break; | 315 | break; |
316 | case 1: | 316 | case 1: |
317 | /* Calling Interface SMI */ | 317 | /* Calling Interface SMI */ |
318 | smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer); | 318 | smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer); |
319 | ret = smi_request(smi_cmd); | 319 | ret = dcdbas_smi_request(smi_cmd); |
320 | if (!ret) | 320 | if (!ret) |
321 | ret = count; | 321 | ret = count; |
322 | break; | 322 | break; |
@@ -333,6 +333,7 @@ out: | |||
333 | mutex_unlock(&smi_data_lock); | 333 | mutex_unlock(&smi_data_lock); |
334 | return ret; | 334 | return ret; |
335 | } | 335 | } |
336 | EXPORT_SYMBOL(dcdbas_smi_request); | ||
336 | 337 | ||
337 | /** | 338 | /** |
338 | * host_control_smi: generate host control SMI | 339 | * 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 { | |||
101 | } __attribute__ ((packed)) parameters; | 101 | } __attribute__ ((packed)) parameters; |
102 | } __attribute__ ((packed)); | 102 | } __attribute__ ((packed)); |
103 | 103 | ||
104 | int dcdbas_smi_request(struct smi_cmd *smi_cmd); | ||
105 | |||
104 | #endif /* _DCDBAS_H_ */ | 106 | #endif /* _DCDBAS_H_ */ |
105 | 107 | ||