mirror of
https://github.com/Fred78290/nct6687d.git
synced 2025-07-23 07:03:04 +02:00
Update nct6687.c
Keep backward compatibility with prévious kernet. Could you try on 6.11?
This commit is contained in:
15
nct6687.c
15
nct6687.c
@@ -37,6 +37,14 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user