#include <linux/device.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include "coreboot_table.h"
struct cbmem_entry { … };
static struct cbmem_entry *to_cbmem_entry(struct kobject *kobj)
{ … }
static ssize_t mem_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf, loff_t pos,
size_t count)
{ … }
static ssize_t mem_write(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf, loff_t pos,
size_t count)
{ … }
static BIN_ATTR_ADMIN_RW(mem, 0);
static ssize_t address_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(address);
static ssize_t size_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(size);
static struct attribute *attrs[] = …;
static struct bin_attribute *bin_attrs[] = …;
static const struct attribute_group cbmem_entry_group = …;
static const struct attribute_group *dev_groups[] = …;
static int cbmem_entry_probe(struct coreboot_device *dev)
{ … }
static const struct coreboot_device_id cbmem_ids[] = …;
MODULE_DEVICE_TABLE(coreboot, cbmem_ids);
static struct coreboot_driver cbmem_entry_driver = …;
module_coreboot_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;