Skip to content

Commit

Permalink
dcdbas: export functionality for use in other drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Garrett authored and Linus Torvalds committed Jan 8, 2009
1 parent f06295b commit 3cab7fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/firmware/dcdbas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -333,6 +333,7 @@ static ssize_t smi_request_store(struct device *dev,
mutex_unlock(&smi_data_lock);
return ret;
}
EXPORT_SYMBOL(dcdbas_smi_request);

/**
* host_control_smi: generate host control SMI
Expand Down
2 changes: 2 additions & 0 deletions drivers/firmware/dcdbas.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,7 @@ struct apm_cmd {
} __attribute__ ((packed)) parameters;
} __attribute__ ((packed));

int dcdbas_smi_request(struct smi_cmd *smi_cmd);

#endif /* _DCDBAS_H_ */

0 comments on commit 3cab7fd

Please sign in to comment.