public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: linux-kernel@vger.kernel.org
Cc: michael_e_brown@dell.com
Subject: [PATCH 1/2] Export SMI call functionality from dcdbas driver
Date: Sat, 16 Aug 2008 21:26:40 +0100	[thread overview]
Message-ID: <20080816202640.GB3331@srcf.ucam.org> (raw)
In-Reply-To: <20080816202452.GA3331@srcf.ucam.org>

Rename the dcdbas SMI request call to avoid namespacing issues, and then 
export it so other kernel modules can make use of the functionality.

Signed-off-by: Matthew Garrett <mjg@redhat.com>

---

commit be8f9ba0f636c9eec356976acc178623ec58651e
Author: Matthew Garrett <mjg59@m6300.(none)>
Date:   Sat Aug 16 21:12:09 2008 +0100

    Add support for using the dcdbas framework from inside the kernel

diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 50a071f..762131b 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;
@@ -279,6 +279,8 @@ out:
 	return ret;
 }
 
+EXPORT_SYMBOL(dcdbas_smi_request);
+
 /**
  * smi_request_store:
  *
@@ -309,14 +311,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;
diff --git a/drivers/firmware/dcdbas.h b/drivers/firmware/dcdbas.h
index 87bc341..ca3cb0a 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_ */
 

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2008-08-16 20:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-16 20:24 [PATCH 0/2] Add Dell laptop driver Matthew Garrett
2008-08-16 20:26 ` Matthew Garrett [this message]
2008-08-16 20:30   ` [PATCH 2/2] " Matthew Garrett
2008-08-16 20:47     ` Arjan van de Ven
2008-08-16 20:51       ` Matthew Garrett
2008-08-20  6:46     ` Andrew Morton
2008-08-20 10:21       ` Matthew Garrett
2008-09-18 20:22 ` [PATCH 0/2] " Michael E Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080816202640.GB3331@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael_e_brown@dell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox