Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp535253pxb; Thu, 5 Nov 2020 06:41:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8vu4NiX3ncxvu0EXYtgMP+m1F1cdKVAiUCRsw8ekpXjCtkXG/GZy9GGHEw7Vy1ZmaXGkv X-Received: by 2002:a17:906:cd0f:: with SMTP id oz15mr2652859ejb.228.1604587299190; Thu, 05 Nov 2020 06:41:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604587299; cv=none; d=google.com; s=arc-20160816; b=bPVbLIdcfo0Jo/Gc2L3oQdVU2uOmmf6KH9m/eRHg/BV8UmOTpNYCELrSH13aPvT2YV ZE/zUtlGLGcy1n9YLhG+Ee3TZlRII1JBfotuRJMV7QKZaexdO9DNhoSnp4mE1oRo+46F KY5dSgsnY/vrVaxSfT5p5vdaftYl0oiN4TYs8dbkVSBpKNW1vhefMa4eCVIBita4IFpp kW8oZy6E7O8wxmnr4BFdRkAbWU+AaUgrjDhFraWGG8iZHvLxOOMUu5r/gGQIokRGpndM ZJZLAY+5Z2GdAg9bfjxmJKi7i/vXrllxnR1t2ziLktRbT9k6LRxLnbBiIjYvLaqiJei1 Ugzg== 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=Gx4esp1H+t/CRh0pOUP9iWgL9zCSVVT3Kg6Fjz064Mc=; b=TBquftq6luADLTQyARnlvldEeTj8zTW8MfMo5HrCXlbaCo3HiseaHu214oqgLXGYOC 3fK9BrMPuyTOBUPf9JAMcj/rz4fZHRj9ytg7G3ZutB31RgKx90zUNwya5DdQa7rJglA2 Og4UTwKOCp+fTjpfDoNlgQe9nXhPHbLNLRSkPo+0yS22f7qEy4EcDx1jkW7CjAiuXs81 7TrWAG5cCdYP2wFHf3nb6AGhCQBx3H/KnYhDMyLyBFHf75Zdf+K9tB3lMZTMINLeaIB2 y8xEfoT0hteD4Y1B/z7cTS0Mje0sTos9LtbSWUnnq4tG8XSNJvrhQf1ZKlQzqFVfp+Sx KsYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Sza5uuRb; 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 d21si1338881ejz.214.2020.11.05.06.41.16; Thu, 05 Nov 2020 06:41:39 -0800 (PST) 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=Sza5uuRb; 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 S1730814AbgKEOhr (ORCPT + 99 others); Thu, 5 Nov 2020 09:37:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730461AbgKEOhr (ORCPT ); Thu, 5 Nov 2020 09:37:47 -0500 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4BD8C0613CF for ; Thu, 5 Nov 2020 06:37:46 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id p93so1772312edd.7 for ; Thu, 05 Nov 2020 06:37:46 -0800 (PST) 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=Gx4esp1H+t/CRh0pOUP9iWgL9zCSVVT3Kg6Fjz064Mc=; b=Sza5uuRbnhrTeO3gZcJ2wSko7ScXGXe6WF+mW9RPfBtta0I5Pn7urHmD6fJSA9ByMA XwOOqdtt7gQFYbbBAEkv7Jr0wgE7Tw7+cMWvAqFfZfJae0mhMOAY+A34sfyIvUTBOrjV qQpPzrc3K2wRG1v7odAnsTQ6c8Nl6gMJLKclgI6j+2DwAMbACeb7x3qli21ekKOcUzSW +/L44Lm5zQngoLduVkdihL3/By/4iwo/mWkB78kLzAOLHyhgpgu3x3K8pMulfHlDb2B8 V6a6s1E/lqcOPTPsXbBji1+Q/4Sz7ha3aehBRJ5nimjnlcn1g9Pb9uDfGyxDziuT81Yl UUVQ== 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=Gx4esp1H+t/CRh0pOUP9iWgL9zCSVVT3Kg6Fjz064Mc=; b=cbNnPNmcP2cPj1ljyY5o2Lar1ruuRMvDcjoTmvGWgIgInbIrecgaTiLByBjv0ZaVNv v7HGkjE5A/DIjlW+1U3diFo1RUOBT6P/TUTFh4Yo2eat7z5CQeFbA436hdlUVRGIjv26 xmQC2Zazis7DSffB7pAy9iqkzbn7kQHJWlk9CUmJIzT5A824bDgye4SNIjFIZay6Ta0W Re/BzA3AhWN0OWq6CK1XONTX3lBa9AaZx4Oreff8CEnbP1X1xl5hsqWC+Wm3f6QC2tnv NjkXIo/9IbMOOUTRjf4Rb5AelhrwXBBTfcVgS91HvGLM0PAA1RYBFIMv/n7G3NCP94eB TiBg== X-Gm-Message-State: AOAM530VqWGEM3VjfdU+dPtBzSa5aPvXzaK94vJOdTRMjGLPhWjn0jjg apNxgDPN1T9VI6mqmu+QME/HiEizFxJQWX62xtcemg== X-Received: by 2002:a50:99c3:: with SMTP id n3mr2893903edb.213.1604587065503; Thu, 05 Nov 2020 06:37:45 -0800 (PST) MIME-Version: 1.0 References: <20201105104049.91077-1-warthog618@gmail.com> In-Reply-To: <20201105104049.91077-1-warthog618@gmail.com> From: Bartosz Golaszewski Date: Thu, 5 Nov 2020 15:37:34 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: fix sysfs when cdev is not selected To: Kent Gibson Cc: LKML , linux-gpio , Linus Walleij , Nicolas Schichan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 5, 2020 at 11:41 AM Kent Gibson wrote: > > In gpiochip_setup_dev() the call to gpiolib_cdev_register() indirectly > calls device_add(). This is still required for the sysfs even when > CONFIG_GPIO_CDEV is not selected in the build. > > Replace the stubbed functions in gpiolib-cdev.h with macros in gpiolib.c > that perform the required device_add() and device_del() when > CONFIG_GPIO_CDEV is not selected. > > Fixes: d143493c01b7 (gpiolib: make cdev a build option) > Reported-by: Nicolas Schichan > Signed-off-by: Kent Gibson Applied for fixes with Nicolas' tag. Bartosz