From 66c35797a515d14a6482fbb9da2f58b407083591 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 2 Sep 2024 13:35:20 +0200 Subject: [PATCH 1/2] fix compilation with kernel 6.11.0-rc6 --- nct6687.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nct6687.c b/nct6687.c index c23889f..de1fa4c 100644 --- a/nct6687.c +++ b/nct6687.c @@ -37,9 +37,6 @@ #include #include -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - enum kinds { nct6683, @@ -1034,7 +1031,7 @@ static void nct6687_setup_pwm(struct nct6687_data *data) } } -static int nct6687_remove(struct platform_device *pdev) +static void nct6687_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct nct6687_data *data = dev_get_drvdata(dev); @@ -1048,8 +1045,6 @@ static int nct6687_remove(struct platform_device *pdev) } mutex_unlock(&data->update_lock); - - return 0; } static int nct6687_probe(struct platform_device *pdev) From ec431bf2ce2c017e4d3ec9a4bda6300ac5a46780 Mon Sep 17 00:00:00 2001 From: Frederic BOLTZ Date: Mon, 2 Sep 2024 16:02:07 +0200 Subject: [PATCH 2/2] Update nct6687.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep backward compatibility with prévious kernet. Could you try on 6.11? --- nct6687.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/nct6687.c b/nct6687.c index de1fa4c..ab43554 100644 --- a/nct6687.c +++ b/nct6687.c @@ -37,6 +37,14 @@ #include #include +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + enum kinds { nct6683, @@ -1031,7 +1039,7 @@ static void nct6687_setup_pwm(struct nct6687_data *data) } } -static void nct6687_remove(struct platform_device *pdev) +static int nct6687_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct nct6687_data *data = dev_get_drvdata(dev); @@ -1045,6 +1053,8 @@ static void nct6687_remove(struct platform_device *pdev) } mutex_unlock(&data->update_lock); + + return 0; } static int nct6687_probe(struct platform_device *pdev) @@ -1157,6 +1167,8 @@ static int nct6687_resume(struct platform_device *pdev) #define NCT6687_DEV_PM_OPS NULL +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wincompatible-pointer-types" static struct platform_driver nct6687_driver = { .driver = { .name = DRVNAME, @@ -1167,6 +1179,7 @@ static struct platform_driver nct6687_driver = { .suspend = nct6687_suspend, .resume = nct6687_resume, }; +#pragma GCC diagnostic pop static int __init nct6687_find(int sioaddr, struct nct6687_sio_data *sio_data) {