summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/dell-smbios.h
AgeCommit message (Collapse)Author
2016-03-23dell-smbios: rename dell_smi_error() to dell_smbios_error()Michał Kępień
As dell_smi_error() is exported by dell-smbios, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_error(). 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>
2016-03-23dell-laptop: move dell_smi_error() to dell-smbiosMichał Kępień
The dell_smi_error() method could be used by modules other than dell-laptop for convenient translation of SMBIOS request errors into errno values. Thus, move it to dell-smbios. 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>
2016-03-23dell-smbios: make da_tokens staticMichał Kępień
As dell-laptop has been changed to use dell_smbios_find_token() instead of directly accessing members of the da_tokens table, the latter can be marked static. 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>
2016-03-23dell-smbios: remove find_token_{id,location}()Michał Kępień
As dell-laptop has been changed to use dell_smbios_find_token() instead of find_token_id() and find_token_location(), these functions can be safely removed. 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>
2016-03-23dell-smbios: implement new function for finding DMI table 0xDA tokensMichał Kępień
Ultimately, the da_tokens table should not be exported from dell-smbios. Currently, in some cases, dell-laptop accesses that table's members directly, so implement a new function, dell_smbios_find_token(), which returns a pointer to an entry inside the da_tokens table with the given token ID (or NULL if it is not found). 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>
2016-03-23dell-smbios: make the SMBIOS buffer staticMichał Kępień
As dell-laptop has been changed to always retrieve a pointer to the SMBIOS buffer using dell_smbios_get_buffer(), the SMBIOS buffer can be marked static. 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>
2016-03-23dell-smbios: return the SMBIOS buffer from dell_smbios_get_buffer()Michał Kępień
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>
2016-03-23dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request()Michał Kępień
An SMBIOS buffer pointer does not need to be returned by dell_smbios_send_request(), because SMBIOS call results are stored in the buffer exported by the module. 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>
2016-03-23dell-smbios: don't pass an SMBIOS buffer to dell_smbios_send_request()Michał Kępień
Passing an SMBIOS buffer pointer to dell_smbios_send_request() is redundant as it should always operate on the SMBIOS buffer exported from the module. 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>
2016-03-23dell-smbios: rename dell_send_request() to dell_smbios_send_request()Michał Kępień
As dell_send_request() is exported from the module, its prefix should be consistent with other exported symbols, so change function name to dell_smbios_send_request(). 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>
2016-03-23dell-smbios: rename release_buffer() to dell_smbios_release_buffer()Michał Kępień
As release_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. 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>
2016-03-23dell-smbios: rename clear_buffer() to dell_smbios_clear_buffer()Michał Kępień
As clear_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. 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>
2016-03-23dell-smbios: rename get_buffer() to dell_smbios_get_buffer()Michał Kępień
As get_buffer() is exported from the module, it has to be renamed to something less generic, so add a "dell_smbios_" prefix to the function name. 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>
2016-03-23dell-laptop: extract SMBIOS-related code to a separate moduleMichał Kępień
Extract SMBIOS-related code from dell-laptop to a new kernel module, dell-smbios. The static specifier is removed from exported symbols, otherwise code is just moved around. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> [dvhart: Include linux/io.h in dell-smbios.c as caught by lkp] Signed-off-by: Darren Hart <dvhart@linux.intel.com>