Message ID | 20240905041732.2034348-9-dmitry.torokhov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A474CD4F56 for <linux-arm-kernel@archiver.kernel.org>; Thu, 5 Sep 2024 04:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4mhjJvDJNhv2xHoY3ut/g1TUbMfaB7j2eg1v0tOHhm4=; b=Pvui8zEMNOXFJ4jyC0giWRG1yd agpO6+yDffGambTX6s4Lkft9OL4pyE++sTtfgfPMM47ZbH4VKcA8XAxVCnNVpqV9fTGYiWb8go1io Gfne/pr89iyDoH98iHdlbGTmuJQAK8nkZ7CuK42e5fT8h7HQhvbj7Jl6K50Mp5cSOel9hg93UWCkJ jzG5iK3vl6wP/fftUXf2vqjyas6+yGASXJHyJyD4r+nLJzwStrQzYHDJi70os3qSwVzCJ5r/Oop0b 8zRFOKGTVW0yYnnMB1J+nJGRqFDsL01zDDR2TC5GN4fRQJ6KVuQbV/hm1XJPF1yFiFK0VKXKY0hjZ UUVTG5DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm44f-00000006vRP-1X99; Thu, 05 Sep 2024 04:26:25 +0000 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm3wS-00000006tPN-3kXY for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 04:17:58 +0000 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-70f73ca989aso254897a34.2 for <linux-arm-kernel@lists.infradead.org>; Wed, 04 Sep 2024 21:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725509875; x=1726114675; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4mhjJvDJNhv2xHoY3ut/g1TUbMfaB7j2eg1v0tOHhm4=; b=N2NWZNrV8Y1GJ5QEquPbyR98mxX7Z1q4bjil0Tkt4IM/UbpWWCI8Jr1fM/7/8yJWu9 PKNqYbKBraVQ4dlKuwVxqCm/abcQdcQAiR6ubhWKmyGLXP7b0+rfzQF6NDjoA3jdfMV0 tXxwc3D4rLR89ESUASMtVeAbt9JMNDFkw2y9KqHXiCDRq5P8ioYEhc7rrS6upmKrxYiY vZWccYZ8zVwfPsI/5IsdSIlsAyZVKNekP5VcOLn8GP6EbKZIjHsW7trEoh1NtQ2zT5Jr VLYc6rUz8C1GP9j2H/CKok44x9p54HMgn4w7THT7apJi5Nf9rwVBQg0WcJsmmEE4kpID UfdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725509875; x=1726114675; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4mhjJvDJNhv2xHoY3ut/g1TUbMfaB7j2eg1v0tOHhm4=; b=HJ5wHqYPqaHLUBnW9m94KWVsFZcFSQXhcZTy1xiIYOmMAx8zZHMnulGvGYsXl0I4N4 /V4Lwng61SP/SIuTNQwPVm+7N4g+fJdAIa/S6NRn5LfMGTX7U5iFWiJcTh2x4LltsYxi bgpYAPGyYCB28nM6dmCb10O7qVClNxFHoX+7HhbYcFuYXJKK0ylWFvjCMV0Yi0TthZYZ r2KrEZlTZQELK5m8BGeP4Q+SRVN/2QRpkT9y3AViD7zRqPlubBFRxR9pn6n1JFFtAObr IIxtWchaC5TyAZCzKWHDKlYCLjMcZ4yya/6RxLGBEda8YWZjFYsemsVWXq7Df6Xj9QAu 2cGQ== X-Forwarded-Encrypted: i=1; AJvYcCWODYkO4LHnghYLqiEz0Qzz8MnemaBJ7yf4bNAYr3ZVL0VL0Cbeg5HORNjV1l7F0F0TioTIfhqG0bMi3pbJtZc2@lists.infradead.org X-Gm-Message-State: AOJu0Yy6RTp0meprZqybWWnu/Fjt2g6muzJGxISI9TaMsKCXYTAhQwkG DynzN5gwQeDTWK68fkHLwVHILCycVQ0g70+DPUt7kIQ75+ejePku X-Google-Smtp-Source: AGHT+IH0JYEg6QtSOGjiEfpDAKUS/a7YvjIKxseySaiP7VkfsPIL/Y4j2nA5ofHv3vaP5pULVvdK1g== X-Received: by 2002:a05:6359:5f9e:b0:1b5:a36f:cf52 with SMTP id e5c5f4694b2df-1b603bee046mr2609562155d.2.1725509875510; Wed, 04 Sep 2024 21:17:55 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2620:15c:9d:2:13bd:b4e:4c0f:4c37]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d4fbd8d52esm2450216a12.32.2024.09.04.21.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 21:17:55 -0700 (PDT) From: Dmitry Torokhov <dmitry.torokhov@gmail.com> To: linux-input@vger.kernel.org Cc: =?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>, Helge Deller <deller@gmx.de>, "K. Y. Srinivasan" <kys@microsoft.com>, Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>, Samuel Holland <samuel@sholland.org>, Lyude Paul <thatslyude@gmail.com>, Michal Simek <michal.simek@amd.com>, Hans de Goede <hdegoede@redhat.com>, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 08/24] Input: synaptics-rmi4 - use guard notation when pausing serio port in F03 Date: Wed, 4 Sep 2024 21:17:13 -0700 Message-ID: <20240905041732.2034348-9-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog In-Reply-To: <20240905041732.2034348-1-dmitry.torokhov@gmail.com> References: <20240905041732.2034348-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_211756_963674_D904A85F X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Convert serio-related drivers to use new cleanup facilities
|
expand
|
diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c index 1e11ea30d7bd..e1157ff0f00a 100644 --- a/drivers/input/rmi4/rmi_f03.c +++ b/drivers/input/rmi4/rmi_f03.c @@ -61,14 +61,14 @@ void rmi_f03_commit_buttons(struct rmi_function *fn) struct f03_data *f03 = dev_get_drvdata(&fn->dev); struct serio *serio = f03->serio; - serio_pause_rx(serio); + guard(serio_pause_rx)(serio); + if (serio->drv) { serio->drv->interrupt(serio, PSMOUSE_OOB_EXTRA_BTNS, SERIO_OOB_DATA); serio->drv->interrupt(serio, f03->overwrite_buttons, SERIO_OOB_DATA); } - serio_continue_rx(serio); } static int rmi_f03_pt_write(struct serio *id, unsigned char val)
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> --- drivers/input/rmi4/rmi_f03.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)