From patchwork Wed Nov 16 16:21:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 625420 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E40C4332F for ; Wed, 16 Nov 2022 16:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238758AbiKPQXv (ORCPT ); Wed, 16 Nov 2022 11:23:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237725AbiKPQWx (ORCPT ); Wed, 16 Nov 2022 11:22:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FCB558025; Wed, 16 Nov 2022 08:22:13 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668615731; 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: in-reply-to:in-reply-to:references:references; bh=pqonCTPpfZXjo2LPJFdK8fQ8y1w5Fa/kW7qM4AbVqk0=; b=OgkpFCVaiSeO+LQ/j6+zQtq0n6iDywSpXysWk+wGMxn5NY8Lpi6yEZG29Hs13yIGUGGf7R IovDJ3VKpFrFu0ZT3784+ms4boN8yY81gPMPLxy5VLgxm9VswgG4LDSV6RwpCD6M18PPQ3 DyvuO05Uo5p96U8R2Agq2vPpwEMV8YpJCMOK2BdOpY5PZsYXMaM19hhfMKY/s3owD+3a5k O/HcKUBHgAWTZQjptpPfbkxfcF3tdywNkKIjcDhE2kwOn6GOZFG+EbEt0l4AsvopEYk96q N4BTImkK5B+on64cfPxFCgcXeQozIy0aoaIyDk++6N4dgk7GQcfgKy1so48+ng== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668615731; 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: in-reply-to:in-reply-to:references:references; bh=pqonCTPpfZXjo2LPJFdK8fQ8y1w5Fa/kW7qM4AbVqk0=; b=JV6AAcU+EGEfeBSOpHE/d0qAz6Prk9Itjm/unhVn8fP0nUKjQJimz54c1dr/2zk1crSuUF XRu1eOSeIs9uzyBw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Peter Zijlstra , Mathias Nyman , linux-usb@vger.kernel.org Subject: [PATCH printk v5 30/40] usb: early: xhci-dbc: use console_is_registered() Date: Wed, 16 Nov 2022 17:27:42 +0106 Message-Id: <20221116162152.193147-31-john.ogness@linutronix.de> In-Reply-To: <20221116162152.193147-1-john.ogness@linutronix.de> References: <20221116162152.193147-1-john.ogness@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- drivers/usb/early/xhci-dbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index bfb7e2b85299..797047154820 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -927,7 +927,7 @@ void __init early_xdbc_register_console(void) static void xdbc_unregister_console(void) { - if (early_xdbc_console.flags & CON_ENABLED) + if (console_is_registered(&early_xdbc_console)) unregister_console(&early_xdbc_console); }