From patchwork Mon Nov 7 14:16:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 16460 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2079593wru; Mon, 7 Nov 2022 06:22:37 -0800 (PST) X-Google-Smtp-Source: AMsMyM7GFhtVtkCVG8sxfjqNkGBZNfHQ2aB00dBNGOHGMDhgXKDQCeW5g3IkVe3hxzQ2mXKQi7sx X-Received: by 2002:a17:906:5e51:b0:7ae:32ca:78c9 with SMTP id b17-20020a1709065e5100b007ae32ca78c9mr17063798eju.166.1667830956950; Mon, 07 Nov 2022 06:22:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667830956; cv=none; d=google.com; s=arc-20160816; b=GG7y+3iL3QKNQ0B7awEY5YEP4rB97d8uu6cP+EifKSWEfAA6b7P+/DWzcw0S1hwYci /UuZgwSKaEP+UQssu3OUJPpWjlsaS4VdScEBM7POjOJGyc9VyH+XdELZkhfp90L6myh9 tkuRPhRO/piDoIoRIJNomdRQXSeQmWLJiPIFm5v6wzOF3nzkcCNxjzud5n27TAWSxQxM iDU97luCd4dRHVGorKwW5bh/NQqIrC9ov412msPhpragI9TqMeDLD18u5QLafFK5bZBe 056MTEDHoefh137ODLq8dyvA0IFDi0aI1EEqMoJirN8i/fdw5yepoTZCg9Ucqg1svWjp WyUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=CoILEQrelgclmLZ3I9Bp0tGORaTvK064dNQM6uNGkhM=; b=DBoEEyVlC8IQ+9DA5Gae2wkgPaptx422rvcE5jopItDF71rbWU92T5padqmBYBb7Os DUKRN8DsCQHyXkPM9tPr68nlqAW1nNAjf7/a31iQ1oYY0h88lrH/TSOzjz/h7YC+Zm0N epW8FA4cKgGCB9lz5Bou3b1SbonfdiEwtquKsIoLI3PjAITw76d7kMU4lNtKF+Ydv3cB UDEKko+bJa4f1X5hcH5TfJpYRTFi3gYhAyChzjMDIJUCxcf0uTf2EiYXOia4Xbs/07wX btPZ455cTCA2e9jL5gzHHbhvdkh+FSIRUfHagdEofSaXpdbAfwW7cG42JeoLSL/WVcKS K/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Hxxn3M2Y; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs17-20020a1709072d1100b0078da5f6ed9esi11533505ejc.779.2022.11.07.06.22.12; Mon, 07 Nov 2022 06:22:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Hxxn3M2Y; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232246AbiKGOS5 (ORCPT + 99 others); Mon, 7 Nov 2022 09:18:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbiKGOQ4 (ORCPT ); Mon, 7 Nov 2022 09:16:56 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBFCB1CFF0; Mon, 7 Nov 2022 06:16:54 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667830613; 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=CoILEQrelgclmLZ3I9Bp0tGORaTvK064dNQM6uNGkhM=; b=Hxxn3M2YEUZ39fDg1K8VMLHgr24Bztgip7MtE5GFTWejedYOTXhyeCdbJCq8S0SVuwAxFc 3oTBTm6DkBylJdeMGlliYzNR85r8VodFZFrkpYgdM65qN8DKhBX8uCJKr2UqDetCyshPao sAJYhlBlmDpL8nYkXuOroyEJswxN5o/4Ys7rc9rj86+MCORH/s9u3VNaae6lCg2dWGxRx6 hfp2r5D2XnHf/wFBhotQFHJQB1yknP8uirmLq2S7vyMZsBouryFE3yk9PyOVdqCpOY6Yf0 HAq3GA2+wRvxbwPNHnKGakc19IHLEWvlOWTujQcmh1kULfUo3DCYrP4LRMsIMQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667830613; 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=CoILEQrelgclmLZ3I9Bp0tGORaTvK064dNQM6uNGkhM=; b=KQEYSXXDSnadzvFVpp56SFo7RXRXwHEShMf1hEj55GJAlbhKPlEHgKaDRBj6yuP6iS7AQ6 vpWqnAdI6D3taZBw== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH printk v3 29/40] tty: serial: samsung_tty: use console_is_registered() Date: Mon, 7 Nov 2022 15:22:27 +0106 Message-Id: <20221107141638.3790965-30-john.ogness@linutronix.de> In-Reply-To: <20221107141638.3790965-1-john.ogness@linutronix.de> References: <20221107141638.3790965-1-john.ogness@linutronix.de> MIME-Version: 1.0 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748847513491711951?= X-GMAIL-MSGID: =?utf-8?q?1748847513491711951?= 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/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 77d1363029f5..9c252c9ca95a 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1732,7 +1732,7 @@ static void __init s3c24xx_serial_register_console(void) static void s3c24xx_serial_unregister_console(void) { - if (s3c24xx_serial_console.flags & CON_ENABLED) + if (console_is_registered(&s3c24xx_serial_console)) unregister_console(&s3c24xx_serial_console); }