Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp219501rdh; Wed, 7 Feb 2024 02:49:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlhGHKwTYxF5TFfJxwKn5+CsZ0OY43kfpE+luyjjoGjIeAZ35jPa7BfLhsC8WErZrB42A1 X-Received: by 2002:a05:6a20:9d94:b0:19e:9bc1:df61 with SMTP id mu20-20020a056a209d9400b0019e9bc1df61mr4527274pzb.50.1707302961188; Wed, 07 Feb 2024 02:49:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707302961; cv=pass; d=google.com; s=arc-20160816; b=hw6L0wPXC43j7nyxxRjEY1/MN8YjYNr9eg/YZ/F/4+LxH452aBJoYq8SXKt8A2+0Yp Do4TQKW24AT7aZWw/f3EtYoOBgdIJHprUNyXclnwN6tLeTXBPFZnIeH4d3rxGR4JHxeJ UYJyKaFeaQfzdUhTfpYmCFPY+JAz5U2qvGtFLE/resP/tXHFx5wODDpIbs0GLPFIbWN0 LfADmtFwvoCaRJF7rV4pvQFF6h8AvXPTxIP1nKHn7qWe88YkK9cA1jl+/dleoAd73SOI RYqeaFn5iIkIz6Adr9CjKDm+BRJ29iVtNvymdLXiH4UR24cZhiqgg37tbQFWBvoun07U Q1/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xRnsurpenkSBU2SV2ZIZMYsYoZ/5QC2RnL93qmcD0JY=; fh=c0zAgqaYGOoeGiKlObu8elLLx4PXkXVJMQI/JaSUlNo=; b=kiVxG/G0AHJPEi6BVwjmD+GOoiVP0O2UV5oLmPu3JBOUr4hmdvHufJzyYcNIUGf7q2 Fpi1MCL3sYbbA8zBtCLTwkqja5gztZBFL8cUi726gkcYUXXI2yVQvj9QR0urNEWV4pAq 9Erc8Isu6/9v1xvfg9sLHrWGs3KuFeQOEqDTvFskO0tCakce5SQaLEco1hf8Vno6prex luA7D0Pf1TNMHwPUhlQJ983g914UxTY0pkf0iPPHMXBk+Ck/Mv3sFPSLQZ1cFKbZt9eu BMi8JiXlLhe/k792/53UU2p2vwgjB7aqH4SQHNVPLsmO3GvgUl9AZiehOLSm84GIOQVL +L2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AV8BBeIJ; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-56342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=2; AJvYcCVWaUvX528GzRPzKci8FYgGFOCSNdvTzeA2T/nfYZxaZRg/rbAml5wdnapon3EUSDUxnseaa1H0/bA+c8ObvryWrqFqerpMz+yNooe00w== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t11-20020a170902bc4b00b001d9d44403bbsi1255316plz.583.2024.02.07.02.49.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 02:49:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AV8BBeIJ; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-56342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9217CB21675 for ; Wed, 7 Feb 2024 10:49:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B39E7171BB; Wed, 7 Feb 2024 10:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AV8BBeIJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5A3717BB4; Wed, 7 Feb 2024 10:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707302948; cv=none; b=YhC+SdHAJ3RJL3zEGEhLSxHPoAbd9I7WYoN5CXY8LDiWJ66o3MOQWD1OQdU1aJU/KleX9TmTUzNpEKdKBJoJOusHyyoTCjHnXb8NHOBFK6CR8K9FBVe0YaS+Axpl4d16si4yIql5RJIdYNA3gcwQyk5w+c57Y55s9YXzbLn/VZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707302948; c=relaxed/simple; bh=HjVI1rzsu+zvlKE1HIxOXNwow7cL5cXi4YaNQhhBG84=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kIL670lE6RjQCNlU8W+X4AfLP5ZVwv1zuu2D0VLjR6QHVmvbZU+Tk4S0Y3AqclxMjdrt3S7u0V6ak/EQeKQ2C3jndT6v0H4p1BbafF+xCcIvsn97E/uAJUhb9pTfx5+i5odrr3CCyFBqskBBvuCs7IC/PnvdymZ7BeRptmDuzJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AV8BBeIJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5913C433F1; Wed, 7 Feb 2024 10:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1707302948; bh=HjVI1rzsu+zvlKE1HIxOXNwow7cL5cXi4YaNQhhBG84=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AV8BBeIJl2tQ1nV+4PPUTSvU8ah2M0D1ak19c8pIvvlyjwR59PkOhskYe7IysKTmr MRpcTccxtnwh3R62ct1PrbRCwJfNfsRNL9ksiEA7QdBSx1As+QXKqnvP5rehfVTo0L vj9pzph8ahvLRVJ0GkjC01q4+5uKlmwbrJHXZ9eg= Date: Wed, 7 Feb 2024 10:49:05 +0000 From: Greg KH To: Linus Walleij Cc: Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH] gpio: set device type for GPIO chips Message-ID: <2024020732-duchess-husband-8b1b@gregkh> References: <20240201162758.50733-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Feb 07, 2024 at 11:45:39AM +0100, Linus Walleij wrote: > On Thu, Feb 1, 2024 at 5:28 PM Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > It's useful to have the device type information for those sub-devices > > that are actually GPIO chips registered with GPIOLIB. While at it: use > > the device type struct to setup the release callback which is the > > preferred way to use the device API. > > > > Signed-off-by: Bartosz Golaszewski > (...= > > +static struct device_type gpio_dev_type = { Can you make this structure const please? > > + .name = "gpio_chip", > > + .release = gpiodev_release, > > +}; > > + gdev->dev.type = &gpio_dev_type; > > gdev->dev.bus = &gpio_bus_type; > > gdev->dev.parent = gc->parent; > > Looks good to me (TM) but we should run this by Greg so he get the chance > to chime in, I doubt he will see it on LKML. Yes thanks, I wouldn't have caught it... greg k-h