Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1086078rwe; Thu, 25 Aug 2022 15:20:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR6TgSW/rpSdhdRY/jg23eDEFQWV3PIfF9VU+ubB01yFPRx6pyed9ne8FSj54mQCBnSxiiln X-Received: by 2002:a17:906:794c:b0:73d:be5b:2b51 with SMTP id l12-20020a170906794c00b0073dbe5b2b51mr3716492ejo.88.1661466012113; Thu, 25 Aug 2022 15:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661466012; cv=none; d=google.com; s=arc-20160816; b=AxkyU5WAyULSS38I27LrmVK7OfCXDdK+tFHzy9H88eMQ4z8w1bLerbqoLesY/VHnWd F/T9Arjulg1b7zOrsu4QO7y0nc5ZGFYVhclR7sVB+A3094bgAcYCclxXo11adSJQx21r y7YkFyVn8Twt0w0L/c8QYVLR23RLvfnZmwZxGRmGGHkvBAsrKDwjs2GPyX/I0VVIF4bZ gOK3RA6+bBb0bbGfzwzOrTr3izGoaxOdMQz3oDui3+MWD9/FT66fsVhFaMre8SqD+6Ke Doi3U1IK3UZxIw3LVSGsN7LXnWwqop/bgWyPK9Q/WQb2k7FYsmo49oBrb+q5rK5et6mS 18/Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=AOHOs5jXLufnwkk18fytBaw8LRZ+UX6dDBWoriO77s0=; b=AKumL0OJGts54iIj8hMZgivFUoCa1ylHHbfI4WIrrHe0GaaV+hJfltb9VWJ52sXtq4 w2+/JnKJozrUUbsnFoQPB4USInR+xiS60N3MnsrsrKd8a+wzjZUGv9DChq3252E2FMvM 45zZ7iGguj9yW8i7flLEr5TGfgeOEGG9xmLIVqyuxUfwWgR6UkrljFpgJtjbBquDq3/S eMGCnbALSOg5d8+Ar+ccpToAKdNxOEVtI4YQ5vo/u3t5/jRaDLUq8PVEiu8w/KEsAkjS iXWrSBHMQ3Eqx5aExJ7GjPyWJwAnFStA/aWPA1X3oeypALXObc9bqYQIw1GNRjwm+2SD ztdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=G3+dGjg7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a056402510600b00447c220a3desi457201edd.167.2022.08.25.15.19.46; Thu, 25 Aug 2022 15:20:12 -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=@gmx.net header.s=badeba3b8450 header.b=G3+dGjg7; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243894AbiHYVoI (ORCPT + 99 others); Thu, 25 Aug 2022 17:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbiHYVoH (ORCPT ); Thu, 25 Aug 2022 17:44:07 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15C8C13F34; Thu, 25 Aug 2022 14:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1661463829; bh=oHP17GZle9QsY5mloPe/0OhWATRtEk9UTdf5L/O9hTE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=G3+dGjg7lOpBTtXrXJe4w08cgKQQvbDPooii1V3CWZgZzZFvRtpxElHPfP3IrBOZ6 KftbS3BM6owS6s3FgGkviysgEI5++ju1aHClks9/FOdLB+CemI9pcT/eDWloiLi8b4 WtkrBnWCeWhAEL2IKwWAxrathx8WUBQbXFBjYo3M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N3KTo-1pQ8lq42Og-010Lyy; Thu, 25 Aug 2022 23:43:49 +0200 From: Armin Wolf To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] hwmon: Add include stubs Date: Thu, 25 Aug 2022 23:43:39 +0200 Message-Id: <20220825214341.2743-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:bDEkywiWyKJRY0hUSsyJZ3TvgWekNIh3hGcBkGWp46d3+gPT1r1 u3FXTzvMViIKqcQxpCueGjyQjk2MoaPO+pOoDwHF+VpYZOZZ7Ktmuir2Ar1KhWSitpUY2T9 O3rsEPHhvSIP2/ael3JEAKGJ1BF8HJhUTwAb37fxZcRvs6/l7OK6XJe73qCxFtUohD2B7LX l6WF3Gi9PMMjiBQLXFYPg== X-UI-Out-Filterresults: notjunk:1;V03:K0:P8m4/AtiHzU=:z4MJAWVc7o2JC88N1aCGIV jmtIS734FLnYERRZPdxeaqliGezhXmd38PqIAgZh4MdFRKUbhw2TaTefMNdhkgAazhVo4rB2c ouTcGE8hmoMgYZ6yP/YBara5yVs6oCsGlno2hNafu6+qmawhWqNBRYs91lUyzqlOhR/bO+jeT SInrDPwCQKR0+Gb8J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W,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Currently, hwmon.h and hwmon-vid.h provide no stub definitions in case hwmon/hwmon-vid support was disabled. This forces drivers using those functions to either select CONFIG_HWMON or to use lots of #ifdef to avoid compilation errors in such a case. One example is the ath10k driver, but radeon and amdgpu would also profit from being able to no longer having to select CONFIG_HWMON. The first patch adds include stubs to hwmon.h and hwmon-vid.h so that drivers can omit such workarounds. The second patch fixes a minor issue in hwmon.h. Both patches where tested with CONFIG_HWMON set to y, m and n, and the resulting kernel was able to boot successfully. Armin Wolf (2): hwmon: Add include stubs hwmon: Use struct definitions from header files include/linux/hwmon-vid.h | 18 +++++++++ include/linux/hwmon.h | 81 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 4 deletions(-) =2D- 2.30.2