#define pr_fmt(fmt) …
#include <linux/container_of.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/capability.h>
#include <linux/dmi.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include "dell-smbios.h"
static u32 da_supported_commands;
static int da_num_tokens;
static struct platform_device *platform_device;
static struct calling_interface_token *da_tokens;
static struct token_sysfs_data *token_entries;
static struct attribute **token_attrs;
static DEFINE_MUTEX(smbios_mutex);
struct token_sysfs_data { … };
struct smbios_device { … };
struct smbios_call { … };
static struct smbios_call call_whitelist[] = …;
static struct smbios_call call_blacklist[] = …;
struct token_range { … };
static struct token_range token_whitelist[] = …;
static struct token_range token_blacklist[] = …;
static LIST_HEAD(smbios_device_list);
int dell_smbios_error(int value)
{ … }
EXPORT_SYMBOL_GPL(…);
int dell_smbios_register_device(struct device *d, void *call_fn)
{ … }
EXPORT_SYMBOL_GPL(…);
void dell_smbios_unregister_device(struct device *d)
{ … }
EXPORT_SYMBOL_GPL(…);
int dell_smbios_call_filter(struct device *d,
struct calling_interface_buffer *buffer)
{ … }
EXPORT_SYMBOL_GPL(…);
int dell_smbios_call(struct calling_interface_buffer *buffer)
{ … }
EXPORT_SYMBOL_GPL(…);
void dell_fill_request(struct calling_interface_buffer *buffer,
u32 arg0, u32 arg1, u32 arg2, u32 arg3)
{ … }
EXPORT_SYMBOL_GPL(…);
int dell_send_request(struct calling_interface_buffer *buffer,
u16 class, u16 select)
{ … }
EXPORT_SYMBOL_GPL(…);
struct calling_interface_token *dell_smbios_find_token(int tokenid)
{ … }
EXPORT_SYMBOL_GPL(…);
static BLOCKING_NOTIFIER_HEAD(dell_laptop_chain_head);
int dell_laptop_register_notifier(struct notifier_block *nb)
{ … }
EXPORT_SYMBOL_GPL(…);
int dell_laptop_unregister_notifier(struct notifier_block *nb)
{ … }
EXPORT_SYMBOL_GPL(…);
void dell_laptop_call_notifier(unsigned long action, void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
bool dell_smbios_class_is_supported(u16 class)
{ … }
EXPORT_SYMBOL_GPL(…);
static void __init parse_da_table(const struct dmi_header *dm)
{ … }
static void zero_duplicates(struct device *dev)
{ … }
static void __init find_tokens(const struct dmi_header *dm, void *dummy)
{ … }
static ssize_t location_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t value_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static struct attribute_group smbios_attribute_group = …;
static struct platform_driver platform_driver = …;
static int build_tokens_sysfs(struct platform_device *dev)
{ … }
static void free_group(struct platform_device *pdev)
{ … }
static int __init dell_smbios_init(void)
{ … }
static void __exit dell_smbios_exit(void)
{ … }
module_init(…) …;
module_exit(dell_smbios_exit);
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;