Remove now useless init/exit function prototypes

This commit is contained in:
Richard Sailer 2019-05-31 19:33:34 +02:00
parent 1ce4d04425
commit 41541a3118

View file

@ -81,13 +81,6 @@ module_param_named(state, param_state, bool, S_IRUSR);
MODULE_PARM_DESC(state, MODULE_PARM_DESC(state,
"Set the State of the Keyboard TRUE = ON | FALSE = OFF"); "Set the State of the Keyboard TRUE = ON | FALSE = OFF");
// Init and Exit methods
static int __init tuxdeo_keyboard_init(void);
static void __exit tuxdeo_keyboard_exit(void);
static int __init tuxedo_input_init(void);
static void __exit tuxedo_input_exit(void);
// Methods for controlling the Keyboard // Methods for controlling the Keyboard
static void set_brightness(u8 brightness); static void set_brightness(u8 brightness);
static void set_kb_state(u8 state); static void set_kb_state(u8 state);
@ -355,6 +348,51 @@ show_hasextra_fs(struct device *child, struct device_attribute *attr,
return sprintf(buffer, "%d\n", keyboard.has_extra); return sprintf(buffer, "%d\n", keyboard.has_extra);
} }
static int __init
tuxedo_input_init(void)
{
int err;
tuxedo_input_device = input_allocate_device();
if (unlikely(!tuxedo_input_device)) {
TUXEDO_ERROR("Error allocating input device\n");
return -ENOMEM;
}
tuxedo_input_device->name = "TUXEDO Keyboard";
tuxedo_input_device->phys = DRIVER_NAME "/input0";
tuxedo_input_device->id.bustype = BUS_HOST;
tuxedo_input_device->dev.parent = &tuxedo_platform_device->dev;
set_bit(EV_KEY, tuxedo_input_device->evbit);
err = input_register_device(tuxedo_input_device);
if (unlikely(err)) {
TUXEDO_ERROR("Error registering input device\n");
goto err_free_input_device;
}
return 0;
err_free_input_device:
input_free_device(tuxedo_input_device);
return err;
}
static void __exit
tuxedo_input_exit(void)
{
if (unlikely(!tuxedo_input_device)) {
return;
}
input_unregister_device(tuxedo_input_device);
{
tuxedo_input_device = NULL;
}
}
static int __init static int __init
tuxdeo_keyboard_init(void) tuxdeo_keyboard_init(void)
{ {
@ -483,51 +521,6 @@ tuxdeo_keyboard_exit(void)
TUXEDO_DEBUG("exit"); TUXEDO_DEBUG("exit");
} }
static int __init
tuxedo_input_init(void)
{
int err;
tuxedo_input_device = input_allocate_device();
if (unlikely(!tuxedo_input_device)) {
TUXEDO_ERROR("Error allocating input device\n");
return -ENOMEM;
}
tuxedo_input_device->name = "TUXEDO Keyboard";
tuxedo_input_device->phys = DRIVER_NAME "/input0";
tuxedo_input_device->id.bustype = BUS_HOST;
tuxedo_input_device->dev.parent = &tuxedo_platform_device->dev;
set_bit(EV_KEY, tuxedo_input_device->evbit);
err = input_register_device(tuxedo_input_device);
if (unlikely(err)) {
TUXEDO_ERROR("Error registering input device\n");
goto err_free_input_device;
}
return 0;
err_free_input_device:
input_free_device(tuxedo_input_device);
return err;
}
static void __exit
tuxedo_input_exit(void)
{
if (unlikely(!tuxedo_input_device)) {
return;
}
input_unregister_device(tuxedo_input_device);
{
tuxedo_input_device = NULL;
}
}
static int static int
tuxedo_wmi_probe(struct platform_device *dev) tuxedo_wmi_probe(struct platform_device *dev)
{ {