Skip to content

Commit f414456

Browse files
committed
Merge tag 'hwmon-fixes-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck: "Fix two regressions in nct6775 and lm90 drivers" * tag 'hwmon-fixes-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (nct6775) Fix platform driver suspend regression hwmon: (lm90) Fix error return value from detect function
2 parents b196f3d + f4e6960 commit f414456

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

drivers/hwmon/lm90.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,7 @@ static const char *lm90_detect_nuvoton(struct i2c_client *client, int chip_id,
23212321
const char *name = NULL;
23222322

23232323
if (config2 < 0)
2324-
return ERR_PTR(-ENODEV);
2324+
return NULL;
23252325

23262326
if (address == 0x4c && !(config1 & 0x2a) && !(config2 & 0xf8)) {
23272327
if (chip_id == 0x01 && convrate <= 0x09) {

drivers/hwmon/nct6775-core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ static int nct6775_update_pwm_limits(struct device *dev)
14801480
return 0;
14811481
}
14821482

1483-
static struct nct6775_data *nct6775_update_device(struct device *dev)
1483+
struct nct6775_data *nct6775_update_device(struct device *dev)
14841484
{
14851485
struct nct6775_data *data = dev_get_drvdata(dev);
14861486
int i, j, err = 0;
@@ -1615,6 +1615,7 @@ static struct nct6775_data *nct6775_update_device(struct device *dev)
16151615
mutex_unlock(&data->update_lock);
16161616
return err ? ERR_PTR(err) : data;
16171617
}
1618+
EXPORT_SYMBOL_GPL(nct6775_update_device);
16181619

16191620
/*
16201621
* Sysfs callback functions

drivers/hwmon/nct6775-platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static int __maybe_unused nct6775_suspend(struct device *dev)
359359
{
360360
int err;
361361
u16 tmp;
362-
struct nct6775_data *data = dev_get_drvdata(dev);
362+
struct nct6775_data *data = nct6775_update_device(dev);
363363

364364
if (IS_ERR(data))
365365
return PTR_ERR(data);

drivers/hwmon/nct6775.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ static inline int nct6775_write_value(struct nct6775_data *data, u16 reg, u16 va
196196
return regmap_write(data->regmap, reg, value);
197197
}
198198

199+
struct nct6775_data *nct6775_update_device(struct device *dev);
200+
199201
bool nct6775_reg_is_word_sized(struct nct6775_data *data, u16 reg);
200202
int nct6775_probe(struct device *dev, struct nct6775_data *data,
201203
const struct regmap_config *regmapcfg);

0 commit comments

Comments
 (0)