Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp462537lqs; Thu, 13 Jun 2024 16:02:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpVqWLGtud+kQtvOzei3dzrv/VNQPcb9cr9zDA3WmXytwvKVc5rI+smo7r/KfR1Syck8HUQ6vJI/DVLye9EMJLE/gd2lfQDcG1+3Giyg== X-Google-Smtp-Source: AGHT+IGqRmxDYS/enTaj8zeqVk/ENxyO82bw5ILbI7Hjf5h0LxngSxphd12TrbA7pMA45I631Gq+ X-Received: by 2002:a05:6a20:729d:b0:1ad:6c36:ee82 with SMTP id adf61e73a8af0-1bae7d85496mr1602985637.13.1718319721811; Thu, 13 Jun 2024 16:02:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718319721; cv=pass; d=google.com; s=arc-20160816; b=X2Da/xYf91oGDu0nQd9NaJ/WUcs4dknsO7XxGmyioj1gljGK0mo2LfZng/u6lagCIh lem7rSit4H7wlbDYF+CowZKcFOHpThVfzknBQfBUXajK7cLiAUu2P3DGzsDMFEXnxG7O A8yDc2IYlQXvucCp8FZJSVAseJhs/qfgTrS20/+cDle9ojD2cYHCT4wx/XQ6TYWrTe6Z SgbENnxOZ5u5wHi390wWEEPeYV1yZv8Hp672LznYf2pWe8ctt400N3YCXKcTWBF4vFYv IlMTzvvld1GUTsQVHPXsCoJrdtxThJI1Bt73q+Wogn/2jV/j7ofu8tn3iZvTqGQSkkX2 p0Uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=u6j2ceVf2H1Eyqmblb7pk/WOlrV+8MRSLiusqpI5xdE=; fh=4XMV6FN58EqvMFSp1D+h1ZGcGkqsAz88EmRv/aLlN/U=; b=r9ib49dT4v2B/ODZUGspMqQIk5hRs3BSC47zz0VzeypOImYviLmABer+3fiY564QOO Qw8NnnIOh1CQwqW8vrR2HRTwk5ytmcs1b6P3fdPSrc6SuJDLeq1YAUqJtVsRBIOH6V4t aPwjdTuPangeOWX5ilBg7bFqTTvHN2nVOb37r09bye8qir5XmdlKtNl1SxoiVozkOHdg Y+6/1z5kh++O/RfIG9asMCiNE3X0Ry1omJ+eTdt+3pI3jy27VGlEL/b0eR8I/zeW+GeR 3mcQxSYrnezO7qMaiq7UPbpP5ZltaXpkBELaW1tKd5TDyvwzmTUj/bxGSX3C63USKOKY 7yDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=WTTp7Y4M; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-214080-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee4637255si2251876a12.585.2024.06.13.16.02.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 16:02:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214080-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=WTTp7Y4M; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-214080-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 687F52840E5 for ; Thu, 13 Jun 2024 23:01:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78E9814D443; Thu, 13 Jun 2024 23:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="WTTp7Y4M" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3232B13D50F; Thu, 13 Jun 2024 23:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718319709; cv=none; b=bLSy97RU9bBHZW7G8RR3enxENXKDlsd8IIrFW8l2C5fQUhbgUG/4Z1AU02kZrAWzeSrc6eYlbcK2P0w/Qv7lXDjObKSsdhjAv11I5NXhtnwLnNi22jWgzGQmUsazUGGsZgQJ35gOPfwVtBksgjC0uNjxHbEXfU3kqa0PLl0tG4Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718319709; c=relaxed/simple; bh=BZVtQqHhflViNbQmzgYDT7jR3J6wdX6z8FyyRLKusww=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=bmx/aIuiEpTfKjR+9I9DvWxEkBA55dZhGSlna67K3n9rut9LH88ggNGWVCGVkQS0caI3+x4L8lk+vj9xIPv0S3g8a/EhPgOP0gRNsgVsrplf3n9/1FMZ9ogu8C++n9NzANM4QYWY+LmO4UgfbpHM17qbmYssad7MDxTNX7u7cLc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=WTTp7Y4M; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1718319705; bh=BZVtQqHhflViNbQmzgYDT7jR3J6wdX6z8FyyRLKusww=; h=From:Date:Subject:To:Cc:From; b=WTTp7Y4M8BiDpHvCdh14luro0jfvDcuOOcD3M+KVpkMKyeRQ+0kBabd2x/kIllHzD Xz+tIplvqdenDMXV9vksQqUAETd3zUCIjsMrfNDixqM4UBjHg+quO1RclBjQ7o6YkS 6S0EdBnBcPrMEGpIBAzzER+AOPd8T1A3P76/k2x0= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 14 Jun 2024 01:01:42 +0200 Subject: [PATCH] hwmon: (core) Make hwmon_class const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240614-class-const-hwmon-v1-1-27b910d06a90@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAFV6a2YC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDM0MT3eScxOJi3eT8vOIS3Yzy3Pw8XVNTMwNDk2QDoyRzAyWgvoKi1LT MCrCZ0bG1tQBb+5WbYwAAAA== To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718319704; l=861; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=BZVtQqHhflViNbQmzgYDT7jR3J6wdX6z8FyyRLKusww=; b=qF8cZO+mKNoYus/N7MwoMK6aWB6D65m0p87hoQVF6RCxd/5G89MMqfsgK6wNv1iXmN08KODaf Ym6fHTxdE9FBbHQc/KN9VoQKiMJHNsetDXtJ2SP9DeUxvbidsdcuD/5 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Now that the driver core allows for struct class to be in read-only memory, mark hwmon_class as const. Signed-off-by: Thomas Weißschuh --- drivers/hwmon/hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 3b259c425ab7..1d1451dd239d 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -136,7 +136,7 @@ static void hwmon_dev_release(struct device *dev) kfree(hwdev); } -static struct class hwmon_class = { +static const struct class hwmon_class = { .name = "hwmon", .dev_groups = hwmon_dev_attr_groups, .dev_release = hwmon_dev_release, --- base-commit: d20f6b3d747c36889b7ce75ee369182af3decb6b change-id: 20240614-class-const-hwmon-556014c02b70 Best regards, -- Thomas Weißschuh