diff options
author | Helmut Raiger <helmut.raiger@hale.at> | 2011-10-19 20:34:43 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-11-03 22:56:18 +0100 |
commit | 435a7285876fa7b3c4e1e6b028e1c490c01d738d (patch) | |
tree | 52e808661f612abd2ee26f503867186f09295dd3 /drivers/misc/pmic_fsl.c | |
parent | 28b119e93387db1b91ec476c74a784d5636d8e86 (diff) |
misc: pmic: fix regression in pmic_fsl.c (SPI)
This fixes write access to PMIC registers, the bug was
introduced partly in commit 64aac65099 and in commit c9fe76dd91.
It was tested on an i.mx31 with a mc13783.
Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/misc/pmic_fsl.c')
-rw-r--r-- | drivers/misc/pmic_fsl.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/misc/pmic_fsl.c b/drivers/misc/pmic_fsl.c index b6e809a188..0ff75ed76e 100644 --- a/drivers/misc/pmic_fsl.c +++ b/drivers/misc/pmic_fsl.c @@ -29,10 +29,7 @@ #if defined(CONFIG_PMIC_SPI) static u32 pmic_spi_prepare_tx(u32 reg, u32 *val, u32 write) { - if ((val == NULL) && (write)) - return *val & ~(1 << 31); - else - return (write << 31) | (reg << 25) | (*val & 0x00FFFFFF); + return (write << 31) | (reg << 25) | (*val & 0x00FFFFFF); } #endif |