public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, Matt_Domsch@dell.com
Subject: Re: [PATCH 1/2] dcdbas: Export functionality for use in other drivers
Date: Tue, 2 Dec 2008 04:03:19 +0000	[thread overview]
Message-ID: <20081202040319.GB17015@srcf.ucam.org> (raw)
In-Reply-To: <20081202035237.GC15966@kroah.com>

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>

---

Only change is the s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/. The firmware 
subdir doesn't seem to have a separate maintainer, so I guess 
driver-core is fine?

diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 50a071f..45f109d 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;
@@ -278,6 +278,7 @@ out:
 	set_cpus_allowed_ptr(current, &old_mask);
 	return ret;
 }
+EXPORT_SYMBOL_GPL(dcdbas_smi_request);
 
 /**
  * smi_request_store:
@@ -309,14 +310,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-12-02  4:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27 16:33 [PATCH 1/2] dcdbas: Export functionality for use in other drivers Matthew Garrett
2008-11-27 16:34 ` [PATCH 2/2] misc: Add dell-laptop driver Matthew Garrett
2008-12-02 17:02   ` Matt Domsch
2008-12-02 17:03     ` Matthew Garrett
2008-12-02 19:50   ` Andrew Morton
2008-12-02 20:05     ` Matthew Garrett
2008-12-02 20:22       ` Andrew Morton
2008-12-02 20:30         ` Matthew Garrett
2008-12-02 20:16     ` [PATCH 2/2 update] " Matthew Garrett
2008-12-03 12:37       ` Alan Jenkins
2008-12-03 13:01       ` none
2008-12-05  2:05         ` Henrique de Moraes Holschuh
2008-12-03 19:14       ` Len Brown
2008-12-03 19:52         ` Matthew Garrett
2008-12-04  9:12           ` Sven Wegener
2008-12-04 11:00           ` Alan Jenkins
2008-12-05  2:08             ` Henrique de Moraes Holschuh
2008-12-02  3:52 ` [PATCH 1/2] dcdbas: Export functionality for use in other drivers Greg KH
2008-12-02  4:03   ` Matthew Garrett [this message]
2008-12-02 17:03     ` Matt Domsch

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=20081202040319.GB17015@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=Matt_Domsch@dell.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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