From patchwork Wed Oct 19 14:55:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 5628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp377998wrs; Wed, 19 Oct 2022 08:08:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4XdAyQbCREzjaLfidhlpGGAh+m36bIPnaDbYetyIGCwrEJyrxeE052jc+TcA1lbRuyLgGy X-Received: by 2002:a05:6402:1555:b0:458:ed89:24e9 with SMTP id p21-20020a056402155500b00458ed8924e9mr8112934edx.55.1666192095581; Wed, 19 Oct 2022 08:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666192095; cv=none; d=google.com; s=arc-20160816; b=ZeiNWbPkWBVa7cyUutneaRj4yW+XnIFhxar/2pm2ISH4CvMriHnl2sP76qsZX6Fw3V V8v3h0HJhLATdWACkLSezdEp4h7Xm9KLlEEh/GvyDXsocUAzR2BzUIefPFBgURbMi/5F 7U1b1gqygZVY2vWrQHJeCIcrCG8j9/6OhQ5zeeyRYGTpBxFvrn50uKh+QpH1bZ1/5pCI oqvnqgsMv0NYiwsBNKwjlXIfl2CGgbaESTDV/4PbZ/DqYgzHrN3/z6wc3uCfnibbagjc cM/YCUl/guZGk0mlsbyn5bQU3n5Y+nzJn/faln8avnj2tcbz0Ed78fK5zNMEsC7cF9IT zTYg== 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=CYLncsVrBizTn0tZlGmVU07Lo3jyJ/DS7XfMGutmnSA=; b=LiGmyspoekCUuUFxOM2t4MqxYRk5N0E2LTDxSlmFeG074j1HaamGM10qJFJiSSqA5h q9lq2RjHFtW3pYvQXZjqaYld3pyPoZGJ8VyLtXlj667VtfHHNsrFBw20vbkHBnwtKqUY NOLjh3ujhPYETgReM/lbD0cTKFKJZWduNmtfgJUpdfQ6yG8GD51eMF939q7wJv8nEfV/ bbQbBFXyIU2go9qJzENws70lqJLEV37s8kRPrgTPHDJki60UQ3F98wu2QUTdYkuJ0eos /mhiKsFS5bn5sE/vgMUSVwfBducpTWRebykCHdIwWR6Kinv7clz8Wm4H6DKEhqesUUlX Lk6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JPedjArJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=S7pfiQDw; 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 cz3-20020a0564021ca300b00459be46b0f4si12509939edb.131.2022.10.19.08.07.34; Wed, 19 Oct 2022 08:08:15 -0700 (PDT) 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=JPedjArJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=S7pfiQDw; 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 S229926AbiJSPFE (ORCPT + 99 others); Wed, 19 Oct 2022 11:05:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232099AbiJSPEE (ORCPT ); Wed, 19 Oct 2022 11:04:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B956EB96; Wed, 19 Oct 2022 07:58:37 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666191369; 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=CYLncsVrBizTn0tZlGmVU07Lo3jyJ/DS7XfMGutmnSA=; b=JPedjArJAuY5hRBDkNnnczWzi0rdtYdWSojm+d6XEyT740PpZPGKZQU8tT+uuaYGiVPfsv wihTQwPpb5Vfqyv+jnFaz5aslcibke0hRWUqpVTOTuDJ52Sk0LuaLb/GZm3txhIsikw6KC X9YIkrLQk7MjDOB4L+8dYq42ZQZWa0JICoBu63P2KT3BFI0l6VLvdUELcHhxm1urY9c4oO srY+3ajo1wLeddjhJXCk3lYKZGbHvMEMjeWmEZQ6iCGDF2dgpc5Hw+kMV7spvVFzkpsW9a N9oAjW1J4KS75rVtgGeiiia5qozkB4wZddYkiJVVpOYDHNoA8R8m6cygY7P6QQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666191369; 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=CYLncsVrBizTn0tZlGmVU07Lo3jyJ/DS7XfMGutmnSA=; b=S7pfiQDwwJc4IAaG+ohuEdR5wq8i6B5ZKrnBe8A+GkV8vDCEdvI4ws2GTEvObuZQVkx4oN ggzfXJPGE1IMo9CA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org Subject: [PATCH printk v2 13/38] tty: serial: pic32_uart: use console_is_enabled() Date: Wed, 19 Oct 2022 17:01:35 +0206 Message-Id: <20221019145600.1282823-14-john.ogness@linutronix.de> In-Reply-To: <20221019145600.1282823-1-john.ogness@linutronix.de> References: <20221019145600.1282823-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?1747129042813643992?= X-GMAIL-MSGID: =?utf-8?q?1747129042813643992?= Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness Reviewed-by: Greg Kroah-Hartman Reviewed-by: Petr Mladek --- drivers/tty/serial/pic32_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index 2beada66c824..d70344dc6e8a 100644 --- a/drivers/tty/serial/pic32_uart.c +++ b/drivers/tty/serial/pic32_uart.c @@ -843,7 +843,7 @@ console_initcall(pic32_console_init); */ static int __init pic32_late_console_init(void) { - if (!(pic32_console.flags & CON_ENABLED)) + if (!console_is_enabled(&pic32_console)) register_console(&pic32_console); return 0;