From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CB91C433B4 for ; Fri, 21 May 2021 12:42:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED235613AC for ; Fri, 21 May 2021 12:42:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231795AbhEUMny (ORCPT ); Fri, 21 May 2021 08:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbhEUMnv (ORCPT ); Fri, 21 May 2021 08:43:51 -0400 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65BADC061574 for ; Fri, 21 May 2021 05:42:27 -0700 (PDT) Received: by mail-yb1-xb2a.google.com with SMTP id g38so27243314ybi.12 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=HnB3/r6wAG0TIDKxHkIiRqrAbzLrehps84umIhidVX5eZAb1dT+C3JxFEr0mUGbN/2 sdVReajjNqeB+4wZqCFcwCsV2hc9mc/6vQGKiVMlAGtyBSnIwFfDNOV1A3W8OxVTsw0R 7n7b76EBekSVg6i4uGmGRBX56GhORDozrpK6WVTos+Y/iBgqiiJjd1nlYfyAKaJbf6DE N9dYvVkT1N6eVfKL+KI4Tx27cp5oQ3HXUKKvBeVyLcsM/VEkz/W4LgohWme22zEBN4Yt 6fEgXuHUVnWcUDOqP6Sit0tvElLARyFH/I0bIenidO1CsClMePfOni0v6dEMO268YInz fe8A== X-Gm-Message-State: AOAM533Z8K/8bAiW2dODls7P5PpBKZ6rcsdovvck40wltfFrrGN98NE1 +NddPrn6xgD+1aaM7EhEBW718bucth4aFfzXIDxqWg== X-Google-Smtp-Source: ABdhPJw8NSAh8QNT84J6otnyIWfXxOPOsTCOyvaPX/caUJfnFQc3Pj0sluJsHos7SGDAJfOig2tB9KwO7ObuEreAodo= 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-gpio@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