]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/regulator/hi6421v600-regulator.c
regulator: hi6421v600: Fix setting wrong driver_data
authorAxel Lin <axel.lin@ingics.com>
Tue, 22 Jun 2021 04:33:29 +0000 (12:33 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 22 Jun 2021 11:47:18 +0000 (12:47 +0100)
commit9bc146acc33125cd9f365b92f1c02ec89f639977
treefcfb94d778a51983fd5ef4f7cab91d2c320ee4d2
parentd1c02a745179ce9a2ed4c559422bf73bd5d99e1b
regulator: hi6421v600: Fix setting wrong driver_data

Current code set "config.driver_data = sreg" but sreg only init the mutex,
the othere fields are just zero. Fix it by pass *info to config.driver_data
so each regulator can get corresponding data by rdev_get_drvdata().

Separate enable_mutex from struct hi6421_spmi_reg_info since only need one
mutex for the driver.

Fixes: d2dfd50a0b57 ("staging: hikey9xx: hi6421v600-regulator: move LDO config from DT")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210622043329.392072-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/hi6421v600-regulator.c