diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2021-06-08 20:17:43 +0930 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2021-06-21 19:50:12 -0500 |
commit | ec6f0cf17a639743e622d4156b0a5009263fd479 (patch) | |
tree | 3d1c5697de3b2cb243faf0aa35553cb5e85f5c94 /drivers/char/ipmi/kcs_bmc.c | |
parent | 78ca0c0549803ab0f5ecab43e295111b7ccdc7f2 (diff) | |
download | linux-stable-ec6f0cf17a639743e622d4156b0a5009263fd479.tar.gz linux-stable-ec6f0cf17a639743e622d4156b0a5009263fd479.tar.bz2 linux-stable-ec6f0cf17a639743e622d4156b0a5009263fd479.zip |
ipmi: kcs_bmc: Make status update atomic
Enable more efficient implementation of read-modify-write sequences.
Both device drivers for the KCS BMC stack use regmaps. The new callback
allows us to exploit regmap_update_bits().
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Zev Weiss <zweiss@equinix.com>
Message-Id: <20210608104757.582199-3-andrew@aj.id.au>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/kcs_bmc.c')
-rw-r--r-- | drivers/char/ipmi/kcs_bmc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/char/ipmi/kcs_bmc.c b/drivers/char/ipmi/kcs_bmc.c index f292e74bd4a5..58fb1a7bd50d 100644 --- a/drivers/char/ipmi/kcs_bmc.c +++ b/drivers/char/ipmi/kcs_bmc.c @@ -67,12 +67,7 @@ static inline void write_status(struct kcs_bmc *kcs_bmc, u8 data) static void update_status_bits(struct kcs_bmc *kcs_bmc, u8 mask, u8 val) { - u8 tmp = read_status(kcs_bmc); - - tmp &= ~mask; - tmp |= val & mask; - - write_status(kcs_bmc, tmp); + kcs_bmc->io_updateb(kcs_bmc, kcs_bmc->ioreg.str, mask, val); } static inline void set_state(struct kcs_bmc *kcs_bmc, u8 state) |