From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11DEAC55186 for ; Wed, 22 Apr 2020 10:51:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8FB42073A for ; Wed, 22 Apr 2020 10:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587552715; bh=TibIueb0M+lOJQSe1nhs/wwZ4oaHWerhdzbeIDpF7PY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BtJgyTSSsnQtzxmIceoA68HKy9lioRvHfWvlXXE90UTzlWmIw4zXKgUn+ZtiXjjzY KMIPjq4trKZpxhKI3Xu5NVgE+zpIFk9t0KFqNhN790aLXKITQ4d/fkYoeb+qZhY7AT U4tqV6V+QiidzPIh5D3279dpr8r1nQn8MV66maUE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729087AbgDVKKw (ORCPT ); Wed, 22 Apr 2020 06:10:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:40700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729030AbgDVKKj (ORCPT ); Wed, 22 Apr 2020 06:10:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E7EF2070B; Wed, 22 Apr 2020 10:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587550238; bh=TibIueb0M+lOJQSe1nhs/wwZ4oaHWerhdzbeIDpF7PY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OP+rlgX16N09QJTLaj6a56+/uTXrqjL3tzH3t6pQyozDoCUk+gI+MT0BwHHHmB9xg yZT4+VSK4vprgd+iFdPu1VXzeuW59sv+v1VARrT0BwBxvmegQMLb0QmteRZS/+Bpy+ 33u5kZjbgKYvUQiD+RWRGZQWr/bQ4Vidu1hbSANo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai , Guenter Roeck Subject: [PATCH 4.14 066/199] ALSA: hda: Initialize power_state field properly Date: Wed, 22 Apr 2020 11:56:32 +0200 Message-Id: <20200422095104.828618585@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200422095057.806111593@linuxfoundation.org> References: <20200422095057.806111593@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 183ab39eb0ea9879bb68422a83e65f750f3192f0 upstream. The recent commit 98081ca62cba ("ALSA: hda - Record the current power state before suspend/resume calls") made the HD-audio driver to store the PM state in power_state field. This forgot, however, the initialization at power up. Although the codec drivers usually don't need to refer to this field in the normal operation, let's initialize it properly for consistency. Fixes: 98081ca62cba ("ALSA: hda - Record the current power state before suspend/resume calls") Signed-off-by: Takashi Iwai Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/hda_codec.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -942,6 +942,7 @@ int snd_hda_codec_new(struct hda_bus *bu /* power-up all before initialization */ hda_set_power_state(codec, AC_PWRST_D0); + codec->core.dev.power.power_state = PMSG_ON; snd_hda_codec_proc_new(codec);