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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B910C433F5 for ; Sun, 3 Oct 2021 09:27:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A4F161206 for ; Sun, 3 Oct 2021 09:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbhJCJ3G (ORCPT ); Sun, 3 Oct 2021 05:29:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:60782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhJCJ3F (ORCPT ); Sun, 3 Oct 2021 05:29:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BECAC6136A; Sun, 3 Oct 2021 09:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633253238; bh=Z+JKvj4sN+KWKBgRz5Yx0sp0MJ32bjEtWch2TgPTOuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NR1vzFmoGwwm80elhuJ9ZJ/BQ6NRrvnRbz88Yez0x5TeUJQSvZSX/1P4oKt3gGdbI eUmosuobMB0Tiw1lOoc1/L9zuJqKv68PWG/62G7p7BG6RDk3AdrE3x7sS+DMw88xkJ FqY4iKV+9UUnWElfR3PcPkD4cT6TqWVcqm4yeUkk= Date: Sun, 3 Oct 2021 11:27:15 +0200 From: Greg Kroah-Hartman To: Len Baker Cc: Henrique de Moraes Holschuh , Hans de Goede , Mark Gross , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] platform/x86: thinkpad_acpi: Convert platform driver to use dev_groups Message-ID: References: <20211003091949.7339-1-len.baker@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211003091949.7339-1-len.baker@gmx.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 03, 2021 at 11:19:49AM +0200, Len Baker wrote: > Platform drivers have the option of having the platform core create and > remove any needed sysfs attribute files. So take advantage of that and > refactor the attributes management to avoid to register them "by hand". > > Also, due to some attributes are optionals, refactor the code and move > the logic inside the "is_visible" callbacks of the attribute_group > structures. > > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Len Baker > --- > drivers/platform/x86/thinkpad_acpi.c | 536 ++++++++++++--------------- > 1 file changed, 236 insertions(+), 300 deletions(-) Nice! At first glance this looks great to me, thanks for doing this. Acked-by: Greg Kroah-Hartman