diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-05 05:02:54 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-05 05:02:54 +0300 |
commit | 0baf6dcc02c130a69fb21088ec31a0ba7a896f22 (patch) | |
tree | 3829dc8d93b88ade1aead03aa7ee340af6a872df /drivers/hwmon/max6639.c | |
parent | b86406d42ae3c41ae0ce332ea24350829b88af51 (diff) | |
parent | 0cf46a653bdae56683fece68dc50340f7520e6c4 (diff) | |
download | linux-0baf6dcc02c130a69fb21088ec31a0ba7a896f22.tar.xz |
Merge tag 'hwmon-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers:
- Driver for MAX31760 fan speed controller
- Driver for TEXAS TPS546D24 Buck Converter
- Driver for EMC2301/2/3/5 RPM-based PWM Fan Speed Controller
Removed drivers:
- Drop obsolete asus_wmi_ec_sensors driver
Cleanups, affecting various drivers:
- Use DEFINE_SIMPLE_DEV_PM_OPS where appropriate
- Remove forward declarations
- Move from strlcpy with unused retval to strscpy
- Make use of devm_clk_get_enabled()
- Drop devm_of_pwm_get()
Other notable cleanup and improvements:
- Support for additional USB devide ID and support for reporting of
rail mode via debugfs added to corsair-psu driver
- Support for aditional USB ID in nzxt-smart2 driver
- Support for Aquacomputer High Flow Next in aquacomputer_d5next
driver
- Major cleanup of pwm-fan driver
- Major cleanup of mr75203 driver, and added support for new device
revision
And various other minor fixes and cleanups"
* tag 'hwmon-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (86 commits)
hwmon: (corsair-psu) add USB id of new revision of the HX1000i psu
hwmon: (pmbus/mp2888) Fix sensors readouts for MPS Multi-phase mp2888 controller
dt-bindings: hwmon: sensirion,shtc1: Clean up spelling mistakes and grammar
hwmon: (nct6683) remove unused variable in nct6683_create_attr_group
hwmon: w83627hf: Reorder symbols to get rid of a few forward declarations
hwmon: (ina3221) Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr()
hwmon: (w83627ehf) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (tmp108) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (tmp103) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (tmp102) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (pwm-fan) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (nct6775) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (max6639) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (max31730) witch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (max31722) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (ltc2947) Switch to EXPORT_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (lm90) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (it87) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (gpio-fan) Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
hwmon: (adt7x10) Switch to EXPORT_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()
...
Diffstat (limited to 'drivers/hwmon/max6639.c')
-rw-r--r-- | drivers/hwmon/max6639.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c index 14bb7726f8d7..9b895402c80d 100644 --- a/drivers/hwmon/max6639.c +++ b/drivers/hwmon/max6639.c @@ -514,7 +514,7 @@ static int max6639_detect(struct i2c_client *client, if (dev_id != 0x58 || manu_id != 0x4D) return -ENODEV; - strlcpy(info->type, "max6639", I2C_NAME_SIZE); + strscpy(info->type, "max6639", I2C_NAME_SIZE); return 0; } @@ -571,7 +571,6 @@ static int max6639_probe(struct i2c_client *client) return PTR_ERR_OR_ZERO(hwmon_dev); } -#ifdef CONFIG_PM_SLEEP static int max6639_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -609,7 +608,6 @@ static int max6639_resume(struct device *dev) return i2c_smbus_write_byte_data(client, MAX6639_REG_GCONFIG, ret & ~MAX6639_GCONFIG_STANDBY); } -#endif /* CONFIG_PM_SLEEP */ static const struct i2c_device_id max6639_id[] = { {"max6639", 0}, @@ -618,13 +616,13 @@ static const struct i2c_device_id max6639_id[] = { MODULE_DEVICE_TABLE(i2c, max6639_id); -static SIMPLE_DEV_PM_OPS(max6639_pm_ops, max6639_suspend, max6639_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(max6639_pm_ops, max6639_suspend, max6639_resume); static struct i2c_driver max6639_driver = { .class = I2C_CLASS_HWMON, .driver = { .name = "max6639", - .pm = &max6639_pm_ops, + .pm = pm_sleep_ptr(&max6639_pm_ops), }, .probe_new = max6639_probe, .id_table = max6639_id, |