Phase in hwmon_device_register_with_info()

This commit is contained in:
brandon_chuang
2019-02-22 10:47:03 +08:00
parent 00ecc395e6
commit a6cf15be8e
58 changed files with 132 additions and 55 deletions

View File

@@ -13,6 +13,7 @@
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/version.h>
#define DRIVER_DESCRIPTION_NAME "accton i2c psu driver" #define DRIVER_DESCRIPTION_NAME "accton i2c psu driver"
/* PMBus Protocol. */ /* PMBus Protocol. */
@@ -331,7 +332,12 @@ static int accton_i2c_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "accton_i2c_psu",
NULL, NULL, NULL);
#else
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register(&client->dev);
#endif
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -30,6 +30,7 @@
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/version.h>
#define MAX_FAN_DUTY_CYCLE 100 #define MAX_FAN_DUTY_CYCLE 100
@@ -244,7 +245,12 @@ static int cpr_4011_4mxx_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "cpr_4011_4mxx",
NULL, NULL, NULL);
#else
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register(&client->dev);
#endif
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -32,6 +32,7 @@
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/version.h>
#define I2C_RW_RETRY_COUNT 10 #define I2C_RW_RETRY_COUNT 10
#define I2C_RW_RETRY_INTERVAL 60 /* ms */ #define I2C_RW_RETRY_INTERVAL 60 /* ms */
@@ -254,7 +255,12 @@ static int dps850_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "dps850",
NULL, NULL, NULL);
#else
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register(&client->dev);
#endif
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -32,6 +32,7 @@
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/version.h>
#define MAX_FAN_DUTY_CYCLE 100 #define MAX_FAN_DUTY_CYCLE 100
#define I2C_RW_RETRY_COUNT 10 #define I2C_RW_RETRY_COUNT 10
@@ -461,7 +462,12 @@ static int ym2651y_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "ym2651y",
NULL, NULL, NULL);
#else
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register(&client->dev);
#endif
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -262,7 +262,8 @@ static int as4610_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as4610_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;
@@ -327,7 +328,7 @@ static int __init as4610_fan_init(void)
int ret; int ret;
if (as4610_number_of_system_fan() == 0) { if (as4610_number_of_system_fan() == 0) {
return -ENODEV; return 0;
} }
ret = platform_driver_register(&as4610_fan_driver); ret = platform_driver_register(&as4610_fan_driver);

View File

@@ -135,7 +135,8 @@ static int as4610_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as4610_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -366,7 +366,8 @@ static int accton_as5512_54x_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as5512_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -145,7 +145,8 @@ static int as5512_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5512_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -355,7 +355,8 @@ static int accton_as5712_54x_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as5712_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -170,7 +170,8 @@ static int as5712_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5712_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -338,7 +338,8 @@ static int as5812_54t_cpld_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5812_54t_cpld",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -355,7 +355,8 @@ static int accton_as5812_54t_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as5812_54t_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -170,7 +170,8 @@ static int as5812_54t_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5812_54t_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -355,7 +355,8 @@ static int accton_as5812_54x_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as5812_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -194,7 +194,8 @@ static int as5812_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5812_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -392,7 +392,8 @@ static int as5822_54x_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as5822_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -169,7 +169,8 @@ static int as5822_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5822_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -425,7 +425,8 @@ static int as5912_54x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5912_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as5912_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5912_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -417,7 +417,8 @@ static int as5912_54xk_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5912_54xk_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as5912_54xk_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5912_54xk_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -417,7 +417,8 @@ static int as5916_54x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5916_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as5916_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5916_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -417,7 +417,8 @@ static int as5916_54xk_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5916_54xk_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as5916_54xk_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5916_54xk_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -417,7 +417,8 @@ static int as5916_54xm_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5916_54xm_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as5916_54xm_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as5916_54xm_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -359,7 +359,8 @@ static int accton_as6712_32x_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as6712_32x_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -168,7 +168,8 @@ static int as6712_32x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as6712_32x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -358,7 +358,8 @@ static int accton_as6812_32x_fan_probe(struct platform_device *pdev)
} }
fan_data->hwmon_dev = hwmon_device_register(&pdev->dev); fan_data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, "as6812_32x_fan",
NULL, NULL, NULL);
if (IS_ERR(fan_data->hwmon_dev)) { if (IS_ERR(fan_data->hwmon_dev)) {
status = PTR_ERR(fan_data->hwmon_dev); status = PTR_ERR(fan_data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -193,7 +193,8 @@ static int as6812_32x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as6812_32x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -420,7 +420,8 @@ static int as7112_54x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7112_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -181,7 +181,8 @@ static int as7112_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7112_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -416,7 +416,8 @@ static int as7312_54x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7312_54x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as7312_54x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7312_54x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -416,7 +416,8 @@ static int as7312_54xs_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7312_54xs_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as7312_54xs_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7312_54xs_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -747,7 +747,8 @@ static int as7326_56x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7326_56x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as7326_56x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7326_56x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -436,7 +436,8 @@ static int as7512_32x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7512_32x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -137,7 +137,8 @@ static int as7512_32x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7512_32x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -439,7 +439,8 @@ static int as7712_32x_cpld_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7712_32x_cpld",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -418,7 +418,8 @@ static int as7712_32x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7712_32x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -181,7 +181,8 @@ static int as7712_32x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7712_32x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -439,7 +439,8 @@ static int as7716_32x_cpld_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7716_32x_cpld",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -418,7 +418,8 @@ static int as7716_32x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7716_32x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -161,7 +161,8 @@ static int as7716_32x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7716_32x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -415,7 +415,8 @@ static int as7726_32x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7726_32x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int as7726_32x_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7726_32x_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -613,7 +613,8 @@ static int as7816_64x_cpld_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7816_64x_cpld",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -388,7 +388,8 @@ static int as7816_64x_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as7816_64x_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -415,7 +415,8 @@ static int as9716_32d_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as9716_32d_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -160,7 +160,8 @@ static int as9716_32d_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "as9716_32d_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -445,7 +445,8 @@ static int asxvolt16_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "asxvolt16_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -136,7 +136,8 @@ static int asxvolt16_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "asxvolt16_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -1,4 +1,4 @@
KERNELS := onl-kernel-3.16-lts-x86-64-all:amd64 KERNELS := onl-kernel-4.14-lts-x86-64-all:amd64
KMODULES := $(wildcard *.c) KMODULES := $(wildcard *.c)
VENDOR := accton VENDOR := accton
BASENAME := x86-64-accton-csp9250 BASENAME := x86-64-accton-csp9250

View File

@@ -418,7 +418,8 @@ static int csp9250_fan_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "csp9250_fan",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;

View File

@@ -135,7 +135,8 @@ static int csp9250_psu_probe(struct i2c_client *client,
goto exit_free; goto exit_free;
} }
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register_with_info(&client->dev, "csp9250_psu",
NULL, NULL, NULL);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
status = PTR_ERR(data->hwmon_dev); status = PTR_ERR(data->hwmon_dev);
goto exit_remove; goto exit_remove;