[PATCH 3/8] ASoC: Intel: catpt: Drop redundant signature argument

Cezary Rojewski <[email protected]>
Newsgroups org.kernel.vger.linux-sound
Message-ID <[email protected]>
Initial design assumed the mechanism could be reused for loading
external modules with signatures differing from the Intel's constant. No
users with such characteristics ever appeared rendering the 'signature'
argument useless.

Signed-off-by: Cezary Rojewski <[email protected]>
---
 sound/soc/intel/catpt/loader.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/catpt/loader.c b/sound/soc/intel/catpt/loader.c
index 79742dceef53..775781489ded 100644
--- a/sound/soc/intel/catpt/loader.c
+++ b/sound/soc/intel/catpt/loader.c
@@ -569,8 +569,7 @@ static int catpt_load_firmware(struct catpt_dev *cdev,
 }
 
 static int catpt_load_image(struct catpt_dev *cdev, struct dma_chan *chan,
-			    const char *name, const char *signature,
-			    bool restore)
+			    const char *name, bool restore)
 {
 	struct catpt_fw_hdr *fw;
 	struct firmware *img;
@@ -583,7 +582,7 @@ static int catpt_load_image(struct catpt_dev *cdev, struct dma_chan *chan,
 		return ret;
 
 	fw = (struct catpt_fw_hdr *)img->data;
-	if (strncmp(fw->signature, signature, FW_SIGNATURE_SIZE)) {
+	if (strncmp(fw->signature, FW_SIGNATURE, FW_SIGNATURE_SIZE)) {
 		dev_err(cdev->dev, "firmware signature mismatch\n");
 		ret = -EINVAL;
 		goto release_fw;
@@ -617,8 +616,7 @@ static int catpt_load_images(struct catpt_dev *cdev, bool restore)
 	if (IS_ERR(chan))
 		return PTR_ERR(chan);
 
-	ret = catpt_load_image(cdev, chan, cdev->spec->fw_name,
-			       FW_SIGNATURE, restore);
+	ret = catpt_load_image(cdev, chan, cdev->spec->fw_name, restore);
 	if (ret)
 		goto release_dma_chan;
 
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.