Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: linux-sound@vger.kernel.org
Cc: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>,
	Pietro Caruso <pietrocaruso50@gmail.com>
Subject: [PATCH v2 2/4] ALSA: emu10k1: make snd_emu1010_load_firmware_entry() void
Date: Sun, 28 Apr 2024 11:37:15 +0200	[thread overview]
Message-ID: <20240428093717.3198716-3-oswald.buddenhagen@gmx.de> (raw)
In-Reply-To: <20240428093717.3198716-1-oswald.buddenhagen@gmx.de>

There is only one call site, and there we already know that we actually
have a firmware.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---
 sound/pci/emu10k1/emu10k1_main.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 353dd3b61c61..ec010971a220 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -652,17 +652,14 @@ static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu)
 	return 0;
 }
 
-static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
+static void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
 				     const struct firmware *fw_entry)
 {
 	int n, i;
 	u16 reg;
 	u8 value;
 	__always_unused u16 write_post;
 
-	if (!fw_entry)
-		return -EIO;
-
 	/* The FPGA is a Xilinx Spartan IIE XC2S50E */
 	/* On E-MU 0404b it is a Xilinx Spartan III XC3S50 */
 	/* GPIO7 -> FPGA PGMN
@@ -694,8 +691,6 @@ static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
 	outw(0x10, emu->port + A_GPIO);
 	write_post = inw(emu->port + A_GPIO);
 	spin_unlock_irq(&emu->emu_lock);
-
-	return 0;
 }
 
 /* firmware file names, per model, init-fw and dock-fw (optional) */
@@ -729,7 +724,8 @@ static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu, int dock,
 			return err;
 	}
 
-	return snd_emu1010_load_firmware_entry(emu, *fw);
+	snd_emu1010_load_firmware_entry(emu, *fw);
+	return 0;
 }
 
 static void snd_emu1010_load_dock_firmware(struct snd_emu10k1 *emu)
-- 
2.44.0.701.g2cf7baacf3.dirty


  parent reply	other threads:[~2024-04-28  9:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28  9:37 [PATCH v2 0/4] ALSA: emu10k1: more improvements related to uploading firmware to the E-MU dock Oswald Buddenhagen
2024-04-28  9:37 ` [PATCH v2 1/4] ALSA: emu10k1: simplify E-MU card FPGA reset sequence Oswald Buddenhagen
2024-04-28  9:37 ` Oswald Buddenhagen [this message]
2024-04-28  9:37 ` [PATCH v2 3/4] ALSA: emu10k1: move snd_emu1010_load_firmware_entry() to io.c Oswald Buddenhagen
2024-04-28  9:37 ` [PATCH v2 4/4] ALSA: emu10k1: move code for entering E-MU card FPGA programming mode Oswald Buddenhagen
2024-04-28 18:16 ` [PATCH v2 0/4] ALSA: emu10k1: more improvements related to uploading firmware to the E-MU dock Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240428093717.3198716-3-oswald.buddenhagen@gmx.de \
    --to=oswald.buddenhagen@gmx.de \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pietrocaruso50@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox