Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4603793rwl; Mon, 10 Apr 2023 13:55:06 -0700 (PDT) X-Google-Smtp-Source: AKy350bGk4sTLx4UIuztxc13NzYiBUL9vIjt7LPZJjJgkZtpn2W7JL7kmmB6SHn5tLfjtFLOUWEq X-Received: by 2002:aa7:9f89:0:b0:62d:91b0:b369 with SMTP id z9-20020aa79f89000000b0062d91b0b369mr11515139pfr.26.1681160105994; Mon, 10 Apr 2023 13:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681160105; cv=none; d=google.com; s=arc-20160816; b=tFQ+u+n+JtQ7wdlJD3Mna4yS72Y3s5udIIV5qTza8fHKkH4TmfnJm0W9NxWd7ul56l If5iIwSzNUmGgP8JL0TX29UNAaQNYdJ56j5YVDHud4w6Uka1OpmLZ+Owos3Ghka4Yi1C QsKOQ5yqUGBx2yjGDBiym1jQVchrTe9OC/c+xhqq0/ZjMHJQUbRjfhiEVolDa+FUjb2V OV625r6ePcW64VRsHfGB0WaLTi/rwhMqKcQLpeyPE42IbTTjBYUtGPp/FRRbtAV4Zgkg ksE8qJxe0S+hhAB0aCnI3K/VCH5MhtQlon9bwxuO3OL7wEZJ2bXR4F20tE5VZ+/26Qoy 64gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bkQUnOWLA+V2iTlaapxkS0DuXVJow8vrvqyKzHmwuBE=; b=c4YGG+yN0KChNB1o68LK3MvvCYQW6SU4hqC42LodIX/8yRatOjHnkjNfMm9h4fwXHT E1uwXWOVettGraVP/Hem4jZ1b0a1adCz++YqiDuwh7oxzX5m/UYFCDq4zf1AxBciwXzo mEE6pw0irkwqepj+QKXXWL5gB3WTVTOR+rJmP9wQw+WrIX3hMPAhoAyo4xrZkmBbiu0a nSilm5+NzSP6QKtiyVv3ncQcQEzYpdWra4MrZRNH5oCuxTZNxBxZr1PYACp6w/ByT97J Aqh0PTzmSUXf/hmOYbE9/5pT6I3G0lzeObK7wiuQt/rT75Eaq/7AWwwt+hv1cCbUJRV7 O/1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mSw0zD5o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020aa795ab000000b0061df95ff7desi11272006pfk.114.2023.04.10.13.54.54; Mon, 10 Apr 2023 13:55:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mSw0zD5o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbjDJUyF (ORCPT + 99 others); Mon, 10 Apr 2023 16:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbjDJUxq (ORCPT ); Mon, 10 Apr 2023 16:53:46 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0128DE6F for ; Mon, 10 Apr 2023 13:53:44 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id g5so8916390wrb.5 for ; Mon, 10 Apr 2023 13:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681160023; x=1683752023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bkQUnOWLA+V2iTlaapxkS0DuXVJow8vrvqyKzHmwuBE=; b=mSw0zD5otsKK5tmRq1nzEby61f1faooSdycceSRUQVSbqwQtQ3QNrRcjZiruaVhTX1 01z0EFsycSofwCc38R6wZMtBEmoO7U5lrSgky/sBpvvget+6owZTp3TaT9grVrgYEJxe 3IFHUkU/yH0MnYIux9ZZElCzeEEF7gId0w05Qshto+uJElSmGN/miERwnchMIKeSSDwb 2jADe8x34PHeZfU50+CCeeCYv5rTqPxvMnpPmPgrgFsO8MFdU9hSujx45zKX+kMvCVrE dcJO2yuj8TD54nLGr8CpsZU02rvzY812iXt2q1vbZ4uCsX8NNW9mJ0zqF7mtQnfBiooT jKyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681160023; x=1683752023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bkQUnOWLA+V2iTlaapxkS0DuXVJow8vrvqyKzHmwuBE=; b=HW7W5ZREAbd8B9U/OJ4auLwe1kKfvh+xOMU3jk100mbo01HHNHVNM2ekQQfu6KrLBc KiIjl7wznfjuAvGgY5ZWw6AQ/rBSnkztUqWvJtiVD1ND8rH35iQEZwADtCU0qaukYi8J zrZnlcc9k683y1sI23lG7FHL/OPw/2EmrYlicBLIkQ7jrMpm0D5xzL9xr///giBjz3+l tZ1KVLka7O2s7AsyHd+tkLwUrb3AKaNMn54yjeoajwyE9zxGvMvFs+FktngjuVukK25a h/x1ppl4a8schioFRvqMdm8NZYoGC9GV9uX48Qs0iyYUyhGMuVlBqbxDPpe46ommtdpJ Z0zg== X-Gm-Message-State: AAQBX9frshONTzKMPM2a5RJQnhEbrXSzUJZnkG86MTZGLpi7AX5hsweq +LDRdXiVjBBIQZ4COS55H3uEPw== X-Received: by 2002:adf:e885:0:b0:2e4:506c:6483 with SMTP id d5-20020adfe885000000b002e4506c6483mr343276wrm.48.1681160023519; Mon, 10 Apr 2023 13:53:43 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:2611:592:3b9e:d2ae]) by smtp.gmail.com with ESMTPSA id e17-20020adffc51000000b002ef2e148d59sm11966789wrs.16.2023.04.10.13.53.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 13:53:43 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Sujith Thomas , Amit Kucheria Subject: [PATCH v2 7/7] thermal/drivers/intel_menlow: Make additionnal sysfs information optional Date: Mon, 10 Apr 2023 22:53:05 +0200 Message-Id: <20230410205305.1649678-8-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410205305.1649678-1-daniel.lezcano@linaro.org> References: <20230410205305.1649678-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Menlon thermal driver creates specific files in the thermal zone sysfs class. It is specific to Menlon and these entries look debug code. It is probable these are not needed. Let's make the code optional and disable it by default. Signed-off-by: Daniel Lezcano --- drivers/thermal/intel/intel_menlow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/intel/intel_menlow.c b/drivers/thermal/intel/intel_menlow.c index d720add918ff..d46dacea1b4d 100644 --- a/drivers/thermal/intel/intel_menlow.c +++ b/drivers/thermal/intel/intel_menlow.c @@ -374,6 +374,9 @@ static int intel_menlow_add_one_attribute(char *name, umode_t mode, void *show, struct intel_menlow_attribute *attr; int result; + if (!IS_ENABLED(CONFIG_THERMAL_SYSFS_OBSOLETE_SINGULARITY)) + return 0; + attr = kzalloc(sizeof(struct intel_menlow_attribute), GFP_KERNEL); if (!attr) return -ENOMEM; -- 2.34.1