From patchwork Sun Aug 25 05:16:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 13776675 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 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 2E79EC5321E for ; Sun, 25 Aug 2024 05:17:45 +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: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:In-Reply-To:References:List-Owner; bh=C7M8d2Iwbu5bICVz8NIEjALytlWBvPo1Tua0bm0Ig2w=; b=P9ZoWtqfNOgDhlsP/mhxmMd0QB yVY8rrpS35Q0OTmhf8b9mBmznebBpo7qBBkgRBfgrONwqASuMmj/U9oD2brC4TfC0Fj7WW4W2R/Uo 7yh+3EwB1+Ue7/9qlMmNggZuw749vuuTeeUHwFWX7SLztDaOhSh2++T13UxGF2HRGcvLPnAwXRD3N 7Ihe9K0jsDpKOFX7rYYyHGLQsvp1G3QLe3Yq1QvKhYEdC8atVhuXdeG6Y7wMeoW+ZaM2/Wp7hvHmh 2ZrzyyUGWQetMfsH40z/K8WrOBm8W/VJFxQf42XHNhJNii1dkXXyZOKmPvj8W9/j15jWNn2iLP5sh frc1VSIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1si5d4-00000003dud-1um9; Sun, 25 Aug 2024 05:17:30 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1si5cH-00000003dat-0R4L for linux-arm-kernel@lists.infradead.org; Sun, 25 Aug 2024 05:16:42 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5d5c8c1006eso2428798eaf.3 for ; Sat, 24 Aug 2024 22:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724562999; x=1725167799; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=C7M8d2Iwbu5bICVz8NIEjALytlWBvPo1Tua0bm0Ig2w=; b=Sf/5p2Mw8JLAuAH1NhSltfIvb9Niza47UeZvVjyCRCpIM0cCcf/u4ZL66+8G1eJsxx MHtFYj5lQYOPgPwOeyqcwRWR4fUJokbpsPwnYtef68N7LHeRjuWhm5wxIux3xBwl5JIv cSK6X2h8hFXuE/9aonHFrHzJD78uiSWy3y63RMUX0LYoMukU3pH5gr7KSJ66f22kyNuD fXsYknupU0x+K5S1PomhFQUfNvytFg+QyMVWRk3ZjyjVOcnuS+lk9q8ecrmkXENLjQI7 45sojfzf0yAFOXx3jqU4PFJe/QTuBznpMuh8VFV7caeuu3F1qelw/61t//rKt6d/F+mE 4c/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724562999; x=1725167799; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C7M8d2Iwbu5bICVz8NIEjALytlWBvPo1Tua0bm0Ig2w=; b=p0xdRk92vVsAL5FJizJbj+JQNpOru7H0LG/mAHad/HSOcClNb2cpk/caVjiuaq/5Qy dTK5maSH/+enShcs/BiWhMm485yRQqs7zjcjUeSVc0BiLz4nuA7KDqJ7KsTHm9+rfnHY 1pTTDmt39zf9DAV+SGoRsDnjAYP2P3qdgtTKDXQndbFGLgaPnVbZi7pYXyidTA4QK6g1 wM7dHh3/Hzh8f5E5Sbd7tP1IqDMwqIQqitY6FywqziWyVnA0uiYQQlfj5XURrPoEaIQg /pA42AdLYk0x5OGRSTrSTenDnKuyblfBje+k8GyjLcOFwDLI13kcZFbtjU8NSWlidSLA PlUQ== X-Forwarded-Encrypted: i=1; AJvYcCXesgtLELRbPMKKSXLX4faQKVuDaY7Det4dLJGIfwhOfBmPvNsdiUAoSpZ2jBrT9urJNvX4lvY9K47k+r+kV3Lo@lists.infradead.org X-Gm-Message-State: AOJu0YwDvji5eRwXanUvfLzg2y2gndh2wjy+hHxEguOudsALHKNyMh6g /Y+Qvm+yU0Y1jp2CtR5iNsPHCJQUEoEr1UT2QmGE+jBcM/hOgY0g X-Google-Smtp-Source: AGHT+IEu/+1X05YCf8jaUm1G0cNhbqDxQwzltk1XvDFoQrjwwCsat+bp2wBTAollbQUz/0WMsmlMyQ== X-Received: by 2002:a05:6358:3a0e:b0:1b1:ac7f:85f6 with SMTP id e5c5f4694b2df-1b5c21edec3mr830073955d.19.1724562998831; Sat, 24 Aug 2024 22:16:38 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2620:15c:9d:2:66dc:ce07:b7cc:51ea]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7cd9ad55a94sm5622442a12.57.2024.08.24.22.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Aug 2024 22:16:38 -0700 (PDT) From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Michael Hennerich , Shawn Guo , Sascha Hauer , Fabio Estevam , Laxman Dewangan , Thierry Reding , Hans de Goede , Tony Lindgren , Jeff LaBundy , linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: [PATCH 00/17] Convert keyboard drivers to use new cleanup facilities Date: Sat, 24 Aug 2024 22:16:04 -0700 Message-ID: <20240825051627.2848495-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240824_221641_165508_0CB77810 X-CRM114-Status: GOOD ( 10.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series converts drivers found in drivers/input/keyboard to use new __free() and guard() cleanup facilities that simplify the code and ensure that all resources are released appropriately. Thanks! Dmitry Torokhov (17): Input: adp5589-keys - use guard notation when acquiring mutex Input: applespi - use guard notation when acquiring spinlock Input: atkbd - use guard notation when acquiring mutex Input: ep93xx_keypad - use guard notation when acquiring mutex Input: gpio-keys - switch to using cleanup functions Input: imx_keypad - use guard notation when acquiring mutex Input: ipaq-micro-keys - use guard notation when acquiring mutex and spinlock Input: iqs62x-keys - use cleanup facility for fwnodes Input: lm8323 - use guard notation when acquiring mutexes Input: lpc32xx-keys - use guard notation when acquiring mutex Input: matrix_keypad - use guard notation when acquiring spinlock Input: omap4-keypad - use guard notation when acquiring mutex Input: pmic8xxx-keypad - use guard notation when acquiring mutex Input: pxa27x_keypad - use guard notation when acquiring mutex Input: spear-keyboard - use guard notation when acquiring mutex Input: st-keyscan - use guard notation when acquiring mutex Input: tegra-kbc - use guard notation when acquiring mutex and spinlock drivers/input/keyboard/adp5589-keys.c | 39 ++++++------- drivers/input/keyboard/applespi.c | 72 ++++++------------------ drivers/input/keyboard/atkbd.c | 37 +++++------- drivers/input/keyboard/ep93xx_keypad.c | 8 +-- drivers/input/keyboard/gpio_keys.c | 44 ++++++--------- drivers/input/keyboard/imx_keypad.c | 27 ++++----- drivers/input/keyboard/ipaq-micro-keys.c | 12 ++-- drivers/input/keyboard/iqs62x-keys.c | 7 +-- drivers/input/keyboard/lm8323.c | 49 ++++++++-------- drivers/input/keyboard/lpc32xx-keys.c | 18 +++--- drivers/input/keyboard/matrix_keypad.c | 18 +++--- drivers/input/keyboard/omap4-keypad.c | 4 +- drivers/input/keyboard/pmic8xxx-keypad.c | 8 +-- drivers/input/keyboard/pxa27x_keypad.c | 16 +++--- drivers/input/keyboard/spear-keyboard.c | 8 +-- drivers/input/keyboard/st-keyscan.c | 19 ++++--- drivers/input/keyboard/tegra-kbc.c | 45 +++++++-------- 17 files changed, 169 insertions(+), 262 deletions(-)