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 DC362C001DC for ; Sun, 30 Jul 2023 11:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229503AbjG3Lif (ORCPT ); Sun, 30 Jul 2023 07:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjG3Lie (ORCPT ); Sun, 30 Jul 2023 07:38:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E61ED189; Sun, 30 Jul 2023 04:38:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7AA5960C1E; Sun, 30 Jul 2023 11:38:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CE8AC433C8; Sun, 30 Jul 2023 11:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690717112; bh=Utllk/tkddiJum7QAnNqbad52ZULbHvTkVGIxPyhS2c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VV1+6gehhZ4GjLtKOsYF9niAy8dsNga1seriKQLKphDp4vhr3YzNAa6RolzlEcRaL 6nH26OunpN/F87lpnt4103JJaYYs3rxbOgGbcKd0YMS52t6m4oZJFb99uxcHUziHB5 9HTAX9ZbhaO8va1lzhSeiBWZ8OsamwT6Tkngkvug= Date: Sun, 30 Jul 2023 13:38:30 +0200 From: Greg Kroah-Hartman To: Marek Vasut Cc: Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/22] Input: ili210x - use device core to create driver-specific device attributes Message-ID: <2023073010-debunk-tripping-270a@gregkh> References: <20230729005133.1095051-1-dmitry.torokhov@gmail.com> <20230729005133.1095051-13-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Sat, Jul 29, 2023 at 05:07:17PM +0200, Marek Vasut wrote: > On 7/29/23 02:51, Dmitry Torokhov wrote: > > Instead of creating driver-specific device attributes with > > devm_device_add_group() have device core do this by setting up dev_groups > > pointer in the driver structure. > > > > Signed-off-by: Dmitry Torokhov > > --- > > drivers/input/touchscreen/ili210x.c | 15 +++++---------- > > 1 file changed, 5 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c > > index ad6828e4f2e2..31ffdc2a93f3 100644 > > --- a/drivers/input/touchscreen/ili210x.c > > +++ b/drivers/input/touchscreen/ili210x.c > > @@ -876,7 +876,7 @@ static ssize_t ili210x_firmware_update_store(struct device *dev, > > static DEVICE_ATTR(firmware_update, 0200, NULL, ili210x_firmware_update_store); > > -static struct attribute *ili210x_attributes[] = { > > +static struct attribute *ili210x_attrs[] = { > > &dev_attr_calibrate.attr, > > &dev_attr_firmware_update.attr, > > &dev_attr_firmware_version.attr, > > @@ -904,10 +904,11 @@ static umode_t ili210x_attributes_visible(struct kobject *kobj, > > return attr->mode; > > } > > -static const struct attribute_group ili210x_attr_group = { > > - .attrs = ili210x_attributes, > > +static const struct attribute_group ili210x_group = { > > + .attrs = ili210x_attrs, > > Is all the renaming really necessary and relevant to this patch ? Yes, it's needed for the __ATTRIBUTE_GROUPS() macro. thanks, greg k-h