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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B957CA100F for ; Tue, 5 Sep 2023 16:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239345AbjIEQHr (ORCPT ); Tue, 5 Sep 2023 12:07:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354509AbjIEMJF (ORCPT ); Tue, 5 Sep 2023 08:09:05 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8E71AD; Tue, 5 Sep 2023 05:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693915741; x=1725451741; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fAfBubslgSKdBchRfYMZIybytubhIFTDeB4uboA6cZ8=; b=iAEMDCGcT1UTrxAYeygbrXwyj9bob7OTF5N4oFzHRdt1Qp8SJnhn1ziY bSW2IAg74lwnFK8tOrSLxqbVh8vOL4oUt+YdU9yWiXOq40lMDwZeUzjoq jkT6GT6hjgaulUbKm051FbnA42IMb9PG8wjrvsA05ZjXRA9YdhJ+yhw+H 2hR3gcXPsrjaBnD+njDk1cmNWBaHpR3JKOXl8hwICzQYl4hmCv1zia1f4 ZRTz2NAIpKJ8netRYVbp77ZLXOE0fquZMuXBYKoTzR+NeH1WwHZhq2Z7q HVAmptAIyBhnFEEHZ4z2grNyN6UBPxANM7zZjdAtKzKEv6zzkQ9WBcvU6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10823"; a="376701442" X-IronPort-AV: E=Sophos;i="6.02,229,1688454000"; d="scan'208";a="376701442" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 05:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10823"; a="690911411" X-IronPort-AV: E=Sophos;i="6.02,229,1688454000"; d="scan'208";a="690911411" Received: from unknown (HELO smile.fi.intel.com) ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 05:08:58 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qdUrW-006g85-2w; Tue, 05 Sep 2023 15:08:54 +0300 Date: Tue, 5 Sep 2023 15:08:54 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Linus Walleij , Kent Gibson , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v3] gpio: sim: don't fiddle with GPIOLIB private members Message-ID: References: <20230905082413.21954-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 05, 2023 at 03:05:17PM +0300, Andy Shevchenko wrote: > On Tue, Sep 05, 2023 at 10:24:13AM +0200, Bartosz Golaszewski wrote: ... > > + chip->swnode = swnode; > > + ret = device_for_each_child(dev, chip, gpio_sim_chip_set_device); > > + if (!ret) > > + return -ENODEV; > > Can bus_find_device_by_fwnode() be used here? Answering to myself: you already mentioned that this should cover any bus, so the answer is "no". But also we have device_find_child() if I understood the purpose of the above it should suit better, no? -- With Best Regards, Andy Shevchenko