Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2673571pxb; Sun, 3 Oct 2021 02:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh6x1tF6H5UHRImGUazw3hdvSMSMLZ931nkVi7vdN5QjfkOqX2G2ud9gexIa35A5KryNZc X-Received: by 2002:a05:6a00:10c6:b0:44c:56ff:91ea with SMTP id d6-20020a056a0010c600b0044c56ff91eamr1583249pfu.25.1633253305485; Sun, 03 Oct 2021 02:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633253305; cv=none; d=google.com; s=arc-20160816; b=J5ObsyuRpkH7LW/vYvRN190pKmvxx03NWekIVClgykq44KYEf/wJeT2blmENfCoIf/ w3NOEL2vC/dikti9q1g3mYeDPX5EPVN+BOMw91LkBvHTYvQT+8LuPncvP5DEng49V84z 7L86S4QsxSYdHdAYRUHSqn4YaGccndh0p5ZsnjMO3deC3w7AptnCDjci1nWcEjbXM88k DcG1465FSgD+9di92AJkXRW1etGg3PrHyjjCTtEDUwnJutcKfM4HuwlkdF15jAiTMRHA 1tFUAVJSYdjfHl/cjWzYQw9oDvuHodx6Brr+lVxoP7eCVzfyauM9ux4/WBAn+3PE0blc zE9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V56HbgZtmJRrFGBNlGLGLtwlACx1aZI2qA45hii23VY=; b=Qp12PY4hhWmigag0LzldlpI9d+ule1lVc3rT0WCiR2Bf49LThrUGDo6pD7TO0RcfFd MiDDP+4VQaMDVN4NrRaGq9fE3k0AhuIk43g7WaZZd14EJvUtCq5XBccDTG/e7lQE2R0M m+ttTAPYh2MtCMOGwzQ6Pw4fksdefGqxqGLNzi6mlNHUHDsXDyISLAJvIXSPJgQPN5pY gzONZ1/PKBXAu/YW/ETkR3TrksiQgxUtoseNkO5b/UHVCSnAVSWdJ8JghUWCGltk3W1q gkf1Q0AyD5oNGTyhPNzXtZ8Z+VnXXyzkKCxZ0kFOu3muTTB+NoXwZJniuvXBb9zJZmbe 8Qaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NR1vzFmo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v23si16589597ple.456.2021.10.03.02.28.12; Sun, 03 Oct 2021 02:28:25 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=NR1vzFmo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbhJCJ3F (ORCPT + 99 others); Sun, 3 Oct 2021 05:29:05 -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