#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/dmi.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/i8042.h>
#include <linux/serio.h>
#define IDEAPAD_BASE …
static bool force;
module_param(force, bool, 0);
MODULE_PARM_DESC(…) …;
static DEFINE_SPINLOCK(io_lock);
static struct input_dev *slidebar_input_dev;
static struct platform_device *slidebar_platform_dev;
static u8 slidebar_pos_get(void)
{ … }
static u8 slidebar_mode_get(void)
{ … }
static void slidebar_mode_set(u8 mode)
{ … }
static bool slidebar_i8042_filter(unsigned char data, unsigned char str,
struct serio *port)
{ … }
static ssize_t show_slidebar_mode(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t store_slidebar_mode(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR(slidebar_mode, S_IWUSR | S_IRUGO,
show_slidebar_mode, store_slidebar_mode);
static struct attribute *ideapad_attrs[] = …;
static struct attribute_group ideapad_attr_group = …;
static const struct attribute_group *ideapad_attr_groups[] = …;
static int __init ideapad_probe(struct platform_device* pdev)
{ … }
static void ideapad_remove(struct platform_device *pdev)
{ … }
static struct platform_driver slidebar_drv = …;
static int __init ideapad_dmi_check(const struct dmi_system_id *id)
{ … }
static const struct dmi_system_id ideapad_dmi[] __initconst = …;
MODULE_DEVICE_TABLE(dmi, ideapad_dmi);
static int __init slidebar_init(void)
{ … }
static void __exit slidebar_exit(void)
{ … }
module_init(…) …;
module_exit(slidebar_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;