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=unavailable 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 C39EBC433ED for ; Fri, 21 May 2021 12:42:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0135613CC for ; Fri, 21 May 2021 12:42:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233608AbhEUMn4 (ORCPT ); Fri, 21 May 2021 08:43:56 -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-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-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