Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2807587lqp; Mon, 25 Mar 2024 09:43:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXT49njVKWUTFY2Ypcu16oFse3lQmAJ+sRaMA2tpVZRHJ77UedzP7VKmrmIUG+MzFclLPoIXNE2CB6PLs7EqPNxS+atv0EAMGRQtCcaLw== X-Google-Smtp-Source: AGHT+IFPaKMNQC0sYn6HH0eJ071HseeuvI99EzdqXQZEhuymuuqNNfswx3oqdwv8ne+HKsBEe9WR X-Received: by 2002:ac2:5452:0:b0:515:b0a0:2c52 with SMTP id d18-20020ac25452000000b00515b0a02c52mr1090492lfn.22.1711385024377; Mon, 25 Mar 2024 09:43:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711385024; cv=pass; d=google.com; s=arc-20160816; b=C9A4xzVcZMxwWgZvCypNJ3UZI0BzIHHCjye9oEltOUY34bgEKpLn6lMpG6fm7WRoOg /RZWSa9wdTBbMYDS+c6HLFYpgIoxQbfSG4bc9+sPyT9r7XnepoQueKHpil4RJa9WQ1VD UhPoaBOta0L3a70IgTsO/nt1r8kcjUXYdNjd8Bkh+7s1G8UYffPcNb/6yEhz1zX8yDAT CSy9wFM9T5onGAy5vED3IXZ9A3uynfWHX6T0zs7HmYiRA6XjH8Z7Wfjoby0Z4LIGBTsa DCzWuuw87QQmY55ROQPW9vHYP2RFY752xAxvu6kraCaB3v57AoqTuEIafAjoBo1fV4mo nqXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Wiglk1r0cdxZ5D6UfXZHUlMlHakoY8HthLuTK4xjf0k=; fh=sTxh2geTW7dplmZV+PHX2EG5YHypaROU3kHa8N5iEMo=; b=CwczQ+AUiS1lyC/Iw2dE4mogIcNT4ocWwtrzozo4fEXLSCQOtNi3kO+XN35R2EIrsX MQ72AXoZWgNsUyzyQfLriJemzRCKGqeH4xPzdBVU+HF7A5bAzWL/mzLeiiSiizfJkBB8 Aiztku6pkZ+tn/WS8XJqqotfFJ54sSPGSIuiK1GUrggVFhs7cwhlev4qGV/xFsMweg1y DFXwjIri0bpLL/FpCAQL9nDY7F5PL2elwAh7Ff3H3pOd/oRjN/ktqF9JOrNITxBia9vB r201Cuu/Dc5ngG5QtyjKStjq3uonYBvdqgUc7HiA8Qtu/LGqdXkX40mWTxks3tL2+zgW NdtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=UA6FZVGf; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-117297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c9-20020a05640227c900b005685142df06si2611941ede.347.2024.03.25.09.43.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 09:43:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=UA6FZVGf; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-117297-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 27E9A1F3E9AA for ; Mon, 25 Mar 2024 16:42:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33D1916ABCC; Mon, 25 Mar 2024 14:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="UA6FZVGf" Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 BBECA157A6E; Mon, 25 Mar 2024 14:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711378520; cv=none; b=ZlNhJB0dZwbURtU3NcxAcFi40UfseaTZQhqWwV17XpLRmbLC48ho6wYqkNegi5z3HtXrsz2hFa66Ox+av2aPsyV3bJ3zXl+pznMFpWqnj8SyslUm81Isht0sVQAYjdolO3x9DPMQjBILybR3BQxzBZWFWRH7XxShi14JrgqKG3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711378520; c=relaxed/simple; bh=OUTG06nJDlO6TyRUnO74rozzjf6s+aA5Hb3q1CX7FjU=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PTek0qUlwh9tVRQPltvtzRWaMQcQMDkZZ6nMCrxmFwBOmtUiYHPkmXwYdQ8PS8QrmLOstJOiOjvoY6yey5g8bzRzeqeHj5T/y0NbgHaja7iXrXGwrdP5cZmQDQP/hkAkbp8ekObcmLSjD4e2Gs+qCs0uIzNMMUNNRVxGGNzGO9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=UA6FZVGf; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42P3P0eY021761; Mon, 25 Mar 2024 09:55:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=W iglk1r0cdxZ5D6UfXZHUlMlHakoY8HthLuTK4xjf0k=; b=UA6FZVGfwAyKfRlaD L4L8q2mSseLEdZFSrCj4C811itT4Nnraulv3reSfs2WweNpX6I6rigQT9K1qibYQ wGUj3kxdKkVx7d/V4F6hljpO6luHX+zZAOScrs9YUA21ibGr7Wx3C7VITJfkzqwE Zv30KrEsV8WX8+XXbCkJTBb7jTrS3YPMy+yJEp0pmZigIGGeAZOzbO+4ahnVDihX zrE/09DPZ7rA/1OmIeasmBo1LSt4wVeBchPbT6YdVzTbJ/0vXIE7s1fzbxQ3jHdK DpStjGZG0RJyiB0skkq9RgZY6QuwZjM3RRWBGYkZZvru3JV8v8pIG4L4nsb6J+sO GXA+g== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3x1vfybjc3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Mar 2024 09:55:13 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 25 Mar 2024 14:55:11 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 25 Mar 2024 14:55:11 +0000 Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id EEEE2820244; Mon, 25 Mar 2024 14:55:10 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , , "Simon Trimmer" , Richard Fitzgerald Subject: [PATCH] ALSA: hda: cs35l56: Set the init_done flag before component_add() Date: Mon, 25 Mar 2024 14:55:10 +0000 Message-ID: <20240325145510.328378-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: xYezW5GbRV6U63GUk9w_nk9e9zLQz_H- X-Proofpoint-GUID: xYezW5GbRV6U63GUk9w_nk9e9zLQz_H- X-Proofpoint-Spam-Reason: safe From: Simon Trimmer Initialization is completed before adding the component as that can start the process of the device binding and trigger actions that check init_done. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") --- sound/pci/hda/cs35l56_hda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c index f3c5715f5e02..1a3f84599cb5 100644 --- a/sound/pci/hda/cs35l56_hda.c +++ b/sound/pci/hda/cs35l56_hda.c @@ -1045,14 +1045,14 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id) pm_runtime_mark_last_busy(cs35l56->base.dev); pm_runtime_enable(cs35l56->base.dev); + cs35l56->base.init_done = true; + ret = component_add(cs35l56->base.dev, &cs35l56_hda_comp_ops); if (ret) { dev_err(cs35l56->base.dev, "Register component failed: %d\n", ret); goto pm_err; } - cs35l56->base.init_done = true; - return 0; pm_err: -- 2.39.2