From bc2104c27aad0c988d23c6abcd46f3313618bdbb Mon Sep 17 00:00:00 2001 From: Michał Kępień Date: Fri, 22 Jan 2016 15:27:20 +0100 Subject: 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ń Reviewed-by: Pali Rohár Signed-off-by: Darren Hart --- drivers/platform/x86/dell-smbios.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/platform/x86/dell-smbios.c') 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); -- cgit v1.2.3