From a34e60889779b47f4962c3adb2cb7ea3fade259e Mon Sep 17 00:00:00 2001 From: Pan Xiuli Date: Thu, 13 Dec 2018 21:02:55 +0800 Subject: [PATCH] ASoC: SOF: Fix wrong print for PCIR PCIR output will always be 0, since it print the ret value of pci_read_config_dword. Signed-off-by: Pan Xiuli --- sound/soc/sof/ops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c index 1eb759c6569c76..387baeb6b9ed2d 100644 --- a/sound/soc/sof/ops.c +++ b/sound/soc/sof/ops.c @@ -18,10 +18,9 @@ int snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset, u32 ret = ~0; /* explicit init to remove uninitialized use warnings */ pci_read_config_dword(sdev->pci, offset, &ret); - dev_dbg(sdev->dev, "Debug PCIR: %8.8x at %8.8x\n", - pci_read_config_dword(sdev->pci, offset, &ret), offset); - old = ret; + dev_dbg(sdev->dev, "Debug PCIR: %8.8x at %8.8x\n", old & mask, offset); + new = (old & (~mask)) | (value & mask); if (old == new)