1
0
Fork 0
Commit Graph

11 Commits (73511ff30c6dc5347ede4c2a2fa5ab22fae3f152)

Author SHA1 Message Date
Michał Kępień 73511ff30c dell-smbios: remove find_token_{id,location}()
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-23 10:05:42 -07:00
Michał Kępień 96f7ef90cc dell-smbios: implement new function for finding DMI table 0xDA tokens
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-23 10:05:41 -07:00
Michał Kępień 92ebd0d1a8 dell-smbios: make the SMBIOS buffer static
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-23 10:05:41 -07:00
Michał Kępień bc2104c27a 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>
2016-03-23 10:05:40 -07:00
Michał Kępień c42831c8a9 dell-smbios: don't return an SMBIOS buffer from dell_smbios_send_request()
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-23 10:05:40 -07:00
Michał Kępień 17070f242a dell-smbios: don't pass an SMBIOS buffer to dell_smbios_send_request()
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-23 10:05:40 -07:00
Michał Kępień 2f26213615 dell-smbios: rename dell_send_request() to dell_smbios_send_request()
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-23 10:05:39 -07:00
Michał Kępień cb16176380 dell-smbios: rename release_buffer() to dell_smbios_release_buffer()
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-23 10:05:39 -07:00
Michał Kępień b6aa7e1817 dell-smbios: rename clear_buffer() to dell_smbios_clear_buffer()
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-23 10:05:38 -07:00
Michał Kępień ee83c47541 dell-smbios: rename get_buffer() to dell_smbios_get_buffer()
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-23 10:05:38 -07:00
Michał Kępień 2f9f26bd86 dell-laptop: extract SMBIOS-related code to a separate module
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>
2016-03-23 10:05:38 -07:00