Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1070511pxj; Fri, 21 May 2021 05:55:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOFbFCloJMlKepgUR9M8yr6wlyU7ci9jXSAI/xlkR7O0Tvs5MyBTB8kPjlLP2if0kcgGbO X-Received: by 2002:a05:6402:30b0:: with SMTP id df16mr11009167edb.85.1621601717284; Fri, 21 May 2021 05:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621601717; cv=none; d=google.com; s=arc-20160816; b=nQL4Z73sW3xhhtithIAR9tLchVrldHSYzYvKwtGjYyBv4E9eHDNiDfz3ttNydm5+pJ 5ENcy7z9FK2eQJGKsvosExhkzvzWKG5nTdhom/AiGCrOO2UrHlDHUPfidt9pBF8TSAxE vM1Due4Zs8avYEWlmJV9z3RnOmv4dFyIJS2CtBLw6UNS3FVjj2Irt8SsyNgHJQEenpyx PaiEulZinUvwJ6EG9jHpIuEgzyGp1uAIOOoJlX5AciTc0JiMsVQ/xKoG2bf1BFUoctxV m8Fr6SybGKjO/0uvjWxdem1vHRFcuaXCEixtToyqTg/rlTCdlh7PYVeNmAFyogLAFEzQ ipnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+/Oecpa/9B6poHryXo2Ss657/x8VcGaDiINXjZStR3M=; b=rQwO720w3OKN3QoosQhavZhwUMDpAKD2dh5/GlhDKDXUP4DvVr+1m0oOBVKlzHlGdr MF1Kc354rcqvC5xq1BMeMAYLFdKQx6roh/bigrmxKphZkJwje9Xf3Kqp27Yh2JFgxXRa tbqIhk72vlJNCaJUxHyttKKpykRD/M7rBDCkKvZXEAwkwWhD8L5xJQR2py/P6Rh3uhQF fNmQLRO2bLD+m6icbBHGp6UFMX9/CWjhw1+xA5KkIUm4knYjYq8hq1ku6AF7EqTtXJio CHHogH+a6jdtuxC2SdflWbONnTBbL+RXCK7TFrzABEeMF9WsV1F01E/M5nSX015uTNs6 ikSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="p2Xeg/ic"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si5446695ejd.446.2021.05.21.05.54.53; Fri, 21 May 2021 05:55:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="p2Xeg/ic"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231901AbhEUMnz (ORCPT + 99 others); Fri, 21 May 2021 08:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231377AbhEUMnv (ORCPT ); Fri, 21 May 2021 08:43:51 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F461C061763 for ; Fri, 21 May 2021 05:42:27 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id h202so6672278ybg.8 for ; Fri, 21 May 2021 05:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+/Oecpa/9B6poHryXo2Ss657/x8VcGaDiINXjZStR3M=; b=p2Xeg/ick8nPMzaDEjBiN7SZ9HRJosstDsZqnMbRdTciey3uuzrocdoX0UbSDNKRQA YASWhp3l7LHkuGXff4QKovu20I8CdYFZLXFTpC9dj1oHQaQKX/oaBnwAlnaA/U4aDF35 XAqCbxiTAY79mUF3nQG4TD3tlGVgsAltZSVhbUNxJU83BrjcG1glP6VUdrQ1gRo91L/r FP4H0qUvKZ7+3XLuGAdgzMB3LZJdj1WdcwyXf9bC86Iyrg3U+2pL3PYQyB4FugAM/Zi6 5JtUdrHiGjTFN7xTY8xd/JhzCAt5B4RqN0kWjP1TNbiYlCrqFBu5DTxrMsscVLzfG5tu eYFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+/Oecpa/9B6poHryXo2Ss657/x8VcGaDiINXjZStR3M=; b=PLSONAJasd747OCwm86DcyEXbUG+7771fOV9qvcomxfWjte1ePN5zgqJCcaGVCe1Qi 2oNUpZFozsSUDEGlK+Dwp9kp+KVVUJdYO1dtx7gu5r87VcynIXIPBKqq/R/Jw3FA/EvZ iDFlxoiDwJKv6l0ZTEgN7taofZsUT15eUn1JCjrneBXV9N9HJCq96npXB4YVjDuiKXe+ ZL5J7vnmRIgRosLXVqMRqMHQ0LSjtWW/B2YiBC1FsBF5kI+Nuox7ZvaINPh02iQhv0+V gJVk0lfr98UkqvNK9WR3pBKJ3/Wd6ui6LMxZHK2jvJcGM4etGgRX0OD9221aMtKQMHvj ta7A== X-Gm-Message-State: AOAM531o4cj8gcTtvj2p+GsKX31yWjD5zw6MAPS1H86NcjPHWT0i+GTR IHjoZicUxLwIUrhLoDq+DyEFD8xWa6XriWuXr+BzWQ== X-Received: by 2002:a25:9d86:: with SMTP id v6mr14285722ybp.366.1621600946680; Fri, 21 May 2021 05:42:26 -0700 (PDT) MIME-Version: 1.0 References: <20210516061425.8757-1-aardelean@deviqon.com> In-Reply-To: <20210516061425.8757-1-aardelean@deviqon.com> From: Bartosz Golaszewski Date: Fri, 21 May 2021 14:42:15 +0200 Message-ID: Subject: Re: [PATCH] gpio: gpio-stmpe: fully use convert probe to device-managed To: Alexandru Ardelean Cc: linux-gpio , LKML , Linus Walleij , alexandre.torgue@foss.st.com, Maxime Coquelin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 16, 2021 at 8:14 AM Alexandru Ardelean wrote: > > The driver doesn't look like it can be built as a kmod, so leaks cannot > happen via a rmmod mechanism. > The remove hook was removed via commit 3b52bb960ec6 ("gpio: stmpe: make > it explicitly non-modular"). > > The IRQ is registered via devm_request_threaded_irq(), making the driver > only partially device-managed. > > In any case all resources should be made device-managed, mostly as a good > practice. That way at least the unwinding on error is happening in reverse > order (as the probe). > > This change also removes platform_set_drvdata() since the information is > never retrieved to be used in the driver. > > Signed-off-by: Alexandru Ardelean I applied the patch and tweaked the commit message because as Andy pointed out - this driver can be unbound over sysfs. Bart