From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 685A211CAF for ; Tue, 7 Jan 2025 01:14:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736212470; cv=none; b=sW5jTB8mleHhB2/ag2TA55/TkfUdP/hZiEiyqBYQuQOo4jipwT4QFC55huo2wmnH+St7DINW1n1mJeVRQ/bByUMbXyFB9jqusVdrh53k/N1CochGd4cDOrl6R35+iB6LzlSJr/t6pxdXpgynwf6fhAdexMmJffDMWFP1MEZXo1g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736212470; c=relaxed/simple; bh=j41OwEow2/+WtKRTYQfmbGjuloR6Ei1FggzMYIFE9Ao=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PVAbbBzmRf3clQ5/4lxGYUgMkdYD/t73d2XReCE9FfLvnaZFjNL5v28XrJgUZ8+E6EqBLEhe8/lAhZftjTSdwEbW4FFNzAGVjrPlf1o6twXusU3BEqnmHRQPUbHNmzXkxCre/R4AWMJ5t3PrKskAyY0ELOOD4TsxXp4b2uMhMuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Ahhna+cM; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Ahhna+cM" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1736212453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GjcpN1zi/1kRiTx1RxUwnV4AY0SoIg2jqQa48YTM6Ec=; b=Ahhna+cMYgfzVis159qNHlUFhRcaLBke4u+JVqpeMfEZ0hH8vlw3mmQaHVmYxn8RZsVB9U +a0EmEgLWO/kFRGje841XdSDmCS/SyK1hK1doY7JQ2E3wxdTYkXAgciYDGLbhFxXy3Rv0K 5pgrEfvAj15/A0Km/GpgmvZF7wlKRUo= From: Thorsten Blum To: Charles Keepax , Richard Fitzgerald , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: Thorsten Blum , linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function Date: Tue, 7 Jan 2025 02:13:54 +0100 Message-ID: <20250107011355.2035-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum --- Changes in v2: - Include string_choices header as suggested by Charles Keepax - Link to v1: https://lore.kernel.org/r/20241229174043.781856-2-thorsten.blum@linux.dev/ --- sound/soc/codecs/madera.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c index b24d6472ad5f..a840a2eb92b9 100644 --- a/sound/soc/codecs/madera.c +++ b/sound/soc/codecs/madera.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -3965,7 +3966,7 @@ static int madera_enable_fll(struct madera_fll *fll) } madera_fll_dbg(fll, "Enabling FLL, initially %s\n", - already_enabled ? "enabled" : "disabled"); + str_enabled_disabled(already_enabled)); if (fll->fout < MADERA_FLL_MIN_FOUT || fll->fout > MADERA_FLL_MAX_FOUT) { @@ -4252,7 +4253,7 @@ static int madera_enable_fll_ao(struct madera_fll *fll, pm_runtime_get_sync(madera->dev); madera_fll_dbg(fll, "Enabling FLL_AO, initially %s\n", - already_enabled ? "enabled" : "disabled"); + str_enabled_disabled(already_enabled)); /* FLL_AO_HOLD must be set before configuring any registers */ regmap_update_bits(fll->madera->regmap, @@ -4576,7 +4577,7 @@ static int madera_fllhj_enable(struct madera_fll *fll) pm_runtime_get_sync(madera->dev); madera_fll_dbg(fll, "Enabling FLL, initially %s\n", - already_enabled ? "enabled" : "disabled"); + str_enabled_disabled(already_enabled)); /* FLLn_HOLD must be set before configuring any registers */ regmap_update_bits(fll->madera->regmap, -- 2.47.1