Remove unused input device
This commit is contained in:
parent
5cd21f7a6a
commit
c3cff5fad2
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/input.h>
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
@ -19,7 +18,6 @@
|
||||||
|
|
||||||
struct system76_data {
|
struct system76_data {
|
||||||
struct acpi_device * acpi_dev;
|
struct acpi_device * acpi_dev;
|
||||||
struct input_dev * input_dev;
|
|
||||||
struct led_classdev ap_led;
|
struct led_classdev ap_led;
|
||||||
struct led_classdev kb_led;
|
struct led_classdev kb_led;
|
||||||
};
|
};
|
||||||
|
|
@ -95,13 +93,6 @@ static void kb_led_set(struct led_classdev * led, enum led_brightness value) {
|
||||||
system76_set(data, "SKBL", (int)value);
|
system76_set(data, "SKBL", (int)value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void system76_key(struct system76_data * data, unsigned int code) {
|
|
||||||
input_report_key(data->input_dev, code, 1);
|
|
||||||
input_sync(data->input_dev);
|
|
||||||
input_report_key(data->input_dev, code, 0);
|
|
||||||
input_sync(data->input_dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void system76_notify(struct acpi_device *acpi_dev, u32 event) {
|
static void system76_notify(struct acpi_device *acpi_dev, u32 event) {
|
||||||
struct system76_data * data = acpi_driver_data(acpi_dev);
|
struct system76_data * data = acpi_driver_data(acpi_dev);
|
||||||
|
|
||||||
|
|
@ -122,20 +113,6 @@ static int system76_add(struct acpi_device *acpi_dev) {
|
||||||
acpi_dev->driver_data = data;
|
acpi_dev->driver_data = data;
|
||||||
data->acpi_dev = acpi_dev;
|
data->acpi_dev = acpi_dev;
|
||||||
|
|
||||||
data->input_dev = devm_input_allocate_device(&acpi_dev->dev);
|
|
||||||
if (!data->input_dev) {
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
data->input_dev->name = "System76 Coreboot ACPI Input";
|
|
||||||
data->input_dev->phys = "system76/input0";
|
|
||||||
data->input_dev->id.bustype = BUS_HOST;
|
|
||||||
set_bit(EV_KEY, data->input_dev->evbit);
|
|
||||||
set_bit(KEY_TOUCHPAD_TOGGLE, data->input_dev->keybit);
|
|
||||||
err = input_register_device(data->input_dev);
|
|
||||||
if (err) {
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
data->ap_led.name = "system76::airplane";
|
data->ap_led.name = "system76::airplane";
|
||||||
data->ap_led.flags = LED_CORE_SUSPENDRESUME;
|
data->ap_led.flags = LED_CORE_SUSPENDRESUME;
|
||||||
data->ap_led.brightness_get = ap_led_get;
|
data->ap_led.brightness_get = ap_led_get;
|
||||||
|
|
@ -163,9 +140,6 @@ static int system76_add(struct acpi_device *acpi_dev) {
|
||||||
static int system76_remove(struct acpi_device *acpi_dev) {
|
static int system76_remove(struct acpi_device *acpi_dev) {
|
||||||
struct system76_data *data = acpi_driver_data(acpi_dev);
|
struct system76_data *data = acpi_driver_data(acpi_dev);
|
||||||
|
|
||||||
input_unregister_device(data->input_dev);
|
|
||||||
data->input_dev = NULL;
|
|
||||||
|
|
||||||
devm_led_classdev_unregister(&acpi_dev->dev, &data->ap_led);
|
devm_led_classdev_unregister(&acpi_dev->dev, &data->ap_led);
|
||||||
|
|
||||||
devm_led_classdev_unregister(&acpi_dev->dev, &data->kb_led);
|
devm_led_classdev_unregister(&acpi_dev->dev, &data->kb_led);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue