aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/dell-smbios.c
diff options
context:
space:
mode:
authorMichał Kępień2016-01-22 15:27:20 +0100
committerDarren Hart2016-03-23 10:05:40 -0700
commitbc2104c27aad0c988d23c6abcd46f3313618bdbb (patch)
tree33dbed178274d41ef07f41f51e34f45c52c0922f /drivers/platform/x86/dell-smbios.c
parentc42831c8a9db32a5a0e2c6c31042014039f11739 (diff)
dell-smbios: return the SMBIOS buffer from dell_smbios_get_buffer()
Ultimately, the SMBIOS buffer should not be exported from dell-smbios. Currently, dell-laptop accesses it directly using a global variable, so make dell_smbios_get_buffer() return a pointer to the SMBIOS buffer and replace all uses of the global variable with local variables. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/dell-smbios.c')
-rw-r--r--drivers/platform/x86/dell-smbios.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/x86/dell-smbios.c b/drivers/platform/x86/dell-smbios.c
index 9dacb20b988e..1427899c4f8f 100644
--- a/drivers/platform/x86/dell-smbios.c
+++ b/drivers/platform/x86/dell-smbios.c
@@ -41,10 +41,11 @@ static int da_num_tokens;
struct calling_interface_token *da_tokens;
EXPORT_SYMBOL_GPL(da_tokens);
-void dell_smbios_get_buffer(void)
+struct calling_interface_buffer *dell_smbios_get_buffer(void)
{
mutex_lock(&buffer_mutex);
dell_smbios_clear_buffer();
+ return buffer;
}
EXPORT_SYMBOL_GPL(dell_smbios_get_buffer);