Commit c78b9566 authored by ChanWoo Lee's avatar ChanWoo Lee Committed by Jialin Zhang
Browse files

mmc: core: Replace with already defined values for readability

stable inclusion
from stable-v5.10.148
commit 0684658366527f206b0812305d94087e40404dca
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0WL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0684658366527f206b0812305d94087e40404dca



--------------------------------

[ Upstream commit e4272664 ]

SD_ROCR_S18A is already defined and is used to check the rocr value, so
let's replace with already defined values for readability.

Signed-off-by: default avatarChanWoo Lee <cw9316.lee@samsung.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220706004840.24812-1-cw9316.lee@samsung.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Stable-dep-of: e9233917 ("mmc: core: Terminate infinite loop in SD-UHS voltage switch")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d562fba2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -853,7 +853,7 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr)
	 * the CCS bit is set as well. We deliberately deviate from the spec in
	 * regards to this, which allows UHS-I to be supported for SDSC cards.
	 */
	if (!mmc_host_is_spi(host) && rocr && (*rocr & 0x01000000)) {
	if (!mmc_host_is_spi(host) && rocr && (*rocr & SD_ROCR_S18A)) {
		err = mmc_set_uhs_voltage(host, pocr);
		if (err == -EAGAIN) {
			retries--;