mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Update clevo-keyboard for Linux 6.11
In the 6.11 kernel, platform::remove was changed to return void instead
of int (0edb555a65
).
Change the corresponding `remove` methods to return void. Since they
previously did not return a nonzero error code, this is not a behavior
change.
This commit is contained in:
parent
ceaab21231
commit
1da421c5fc
|
@ -19,6 +19,7 @@
|
||||||
#ifndef CLEVO_KEYBOARD_H
|
#ifndef CLEVO_KEYBOARD_H
|
||||||
#define CLEVO_KEYBOARD_H
|
#define CLEVO_KEYBOARD_H
|
||||||
|
|
||||||
|
#include <linux/version.h>
|
||||||
#include "tuxedo_keyboard_common.h"
|
#include "tuxedo_keyboard_common.h"
|
||||||
#include "clevo_interfaces.h"
|
#include "clevo_interfaces.h"
|
||||||
#include "clevo_leds.h"
|
#include "clevo_leds.h"
|
||||||
|
@ -358,12 +359,20 @@ static void clevo_keyboard_remove_device_interface(struct platform_device *dev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||||
static int clevo_keyboard_remove(struct platform_device *dev)
|
static int clevo_keyboard_remove(struct platform_device *dev)
|
||||||
{
|
{
|
||||||
clevo_keyboard_remove_device_interface(dev);
|
clevo_keyboard_remove_device_interface(dev);
|
||||||
clevo_leds_remove(dev);
|
clevo_leds_remove(dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static void clevo_keyboard_remove(struct platform_device *dev)
|
||||||
|
{
|
||||||
|
clevo_keyboard_remove_device_interface(dev);
|
||||||
|
clevo_leds_remove(dev);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int clevo_keyboard_suspend(struct platform_device *dev, pm_message_t state)
|
static int clevo_keyboard_suspend(struct platform_device *dev, pm_message_t state)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1214,7 +1214,11 @@ static int uniwill_keyboard_probe(struct platform_device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||||
static int uniwill_keyboard_remove(struct platform_device *dev)
|
static int uniwill_keyboard_remove(struct platform_device *dev)
|
||||||
|
#else
|
||||||
|
static void uniwill_keyboard_remove(struct platform_device *dev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (uw_charging_prio_loaded)
|
if (uw_charging_prio_loaded)
|
||||||
sysfs_remove_group(&dev->dev.kobj, &uw_charging_prio_attr_group);
|
sysfs_remove_group(&dev->dev.kobj, &uw_charging_prio_attr_group);
|
||||||
|
@ -1238,8 +1242,9 @@ static int uniwill_keyboard_remove(struct platform_device *dev)
|
||||||
|
|
||||||
// Disable manual mode
|
// Disable manual mode
|
||||||
uniwill_write_ec_ram(0x0741, 0x00);
|
uniwill_write_ec_ram(0x0741, 0x00);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uniwill_keyboard_suspend(struct platform_device *dev, pm_message_t state)
|
static int uniwill_keyboard_suspend(struct platform_device *dev, pm_message_t state)
|
||||||
|
|
Loading…
Reference in a new issue