Skip to content

Commit

Permalink
kernel: update drivers to be compatible with kernel 6.12
Browse files Browse the repository at this point in the history
Update drivers to be compatible with kernel 6.12.

Signed-off-by: Mieczyslaw Nalewaj <[email protected]>
  • Loading branch information
namiltd committed Oct 22, 2024
1 parent aa76fc9 commit 47376c1
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 2 deletions.
6 changes: 6 additions & 0 deletions package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,11 @@ static void gpio_keys_irq_close(struct gpio_keys_button_dev *bdev)
}
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int gpio_keys_remove(struct platform_device *pdev)
#else
static void gpio_keys_remove(struct platform_device *pdev)
#endif
{
struct gpio_keys_button_dev *bdev = platform_get_drvdata(pdev);

Expand All @@ -685,7 +689,9 @@ static int gpio_keys_remove(struct platform_device *pdev)
else
gpio_keys_irq_close(bdev);

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}

static struct platform_driver gpio_keys_driver = {
Expand Down
6 changes: 6 additions & 0 deletions package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2780,7 +2780,11 @@ static int ltq_mei_probe(struct platform_device *pdev)
return 0;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int ltq_mei_remove(struct platform_device *pdev)
#else
static void ltq_mei_remove(struct platform_device *pdev)
#endif
{
int i = 0;
int num;
Expand All @@ -2794,7 +2798,9 @@ static int ltq_mei_remove(struct platform_device *pdev)
IFX_MEI_ExitDevice (i);
}
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}

static const struct of_device_id ltq_mei_match[] = {
Expand Down
7 changes: 6 additions & 1 deletion package/kernel/lantiq/ltq-atm/src/ltq_atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <linux/atm.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/version.h>
#ifdef CONFIG_XFRM
#include <net/xfrm.h>
#endif
Expand Down Expand Up @@ -1865,7 +1864,11 @@ static int ltq_atm_probe(struct platform_device *pdev)
return ret;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int ltq_atm_remove(struct platform_device *pdev)
#else
static void ltq_atm_remove(struct platform_device *pdev)
#endif
{
int port_num;
struct ltq_atm_ops *ops = platform_get_drvdata(pdev);
Expand All @@ -1886,7 +1889,9 @@ static int ltq_atm_remove(struct platform_device *pdev)

clear_priv_data();

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}

static struct platform_driver ltq_atm_driver = {
Expand Down
8 changes: 7 additions & 1 deletion package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ static int ltq_deu_probe(struct platform_device *pdev)
* \ingroup IFX_DEU_FUNCTIONS
* \brief remove the loaded crypto algorithms
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int ltq_deu_remove(struct platform_device *pdev)
#else
static void ltq_deu_remove(struct platform_device *pdev)
#endif
{
//#ifdef CONFIG_CRYPTO_DEV_PWR_SAVE_MODE
#if defined(CONFIG_CRYPTO_DEV_DES)
Expand All @@ -169,7 +173,9 @@ static int ltq_deu_remove(struct platform_device *pdev)
#endif
printk("DEU has exited successfully\n");

return 0;
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}


Expand Down
6 changes: 6 additions & 0 deletions package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,11 @@ static int ltq_ptm_probe(struct platform_device *pdev)
* Output:
* none
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int ltq_ptm_remove(struct platform_device *pdev)
#else
static void ltq_ptm_remove(struct platform_device *pdev)
#endif
{
int i;

Expand All @@ -1592,7 +1596,9 @@ static int ltq_ptm_remove(struct platform_device *pdev)

clear_priv_data();

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}

static struct platform_driver ltq_ptm_driver = {
Expand Down
6 changes: 6 additions & 0 deletions package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,11 @@ static int ltq_ptm_probe(struct platform_device *pdev)
return ret;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int ltq_ptm_remove(struct platform_device *pdev)
#else
static void ltq_ptm_remove(struct platform_device *pdev)
#endif
{
int i;
ifx_mei_atm_showtime_enter = NULL;
Expand All @@ -1104,7 +1108,9 @@ static int ltq_ptm_remove(struct platform_device *pdev)

clear_priv_data();

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}

#ifndef MODULE
Expand Down
8 changes: 8 additions & 0 deletions package/kernel/ubootenv-nvram/src/ubootenv-nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/version.h>

#define NAME "ubootenv"

Expand Down Expand Up @@ -132,13 +133,20 @@ static int ubootenv_probe(struct platform_device *pdev)
return misc_register(&data->misc);
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
static int ubootenv_remove(struct platform_device *pdev)
#else
static void ubootenv_remove(struct platform_device *pdev)
#endif
{
struct ubootenv_drvdata *data = platform_get_drvdata(pdev);

data->env = NULL;
misc_deregister(&data->misc);

#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
return 0;
#endif
}

static struct platform_driver ubootenv_driver = {
Expand Down

0 comments on commit 47376c1

Please sign in to comment.