From patchwork Tue Dec 19 14:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1976536dyi; Tue, 19 Dec 2023 06:30:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFojZAA8O7CM1ShdgCpnKpxOmqKzvTxlR9XTSUZqlCvWs8CZkYOT9Bch1USG6WCXBHZFgep X-Received: by 2002:a05:622a:14c6:b0:425:917c:7536 with SMTP id u6-20020a05622a14c600b00425917c7536mr2022232qtx.119.1702996216843; Tue, 19 Dec 2023 06:30:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702996216; cv=none; d=google.com; s=arc-20160816; b=jVEW7QQ9O8YmfQryEa8TTaWyFiV1CuylZah5ditJDyBnRQNA5JLvxd6GLgdWh/15AC 3ltVYAkBq8FH2pW/GzyUB475XCirVs36V5kp1N7nKoIN2i9NkFFWWT4VJPkl9ZeyBRuf fXgY3jqTd0NvPcBkH0J5IspXHiCI3kURodoA387tBfKy2Eciiz+ojyqB+XXos9xi3A4g vSYIDJo/3MthJZFl9r85TH+xiWrcSPuR8pf7z/si8w8XfSfy1utsQtDOOZ8G89CnelRQ GjaLec5gMcJbFXbXYsN4v8XsX1zXW0jxHyS9g01jtiMdpQHeSHduUF1ync0c5/ieKIeI edEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:lines:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2dNmt4+p7ARnZK8dRMTWWkCgGTt4ORi5beS3xgJISFM=; fh=3wkXdiTw56duFi5pjWQ7QE2n4GnLJvyjxe69GuN0kTw=; b=MIx9URbu60BVryzwKEs8LmQqgtBQaedjO5fKKDMCFzuuyRlLrWXQW4Z/k3NLaydXjz wie0gtimD85+X1qrIiepRlv5v7Qmfpw9XufMO6fA1fTpEFm/CMxqxizJJ37tFZxCg5RS 3/3fevqgHlumXGs0NGsejX5D6ulxP4RxiL1vMqXkSEPlokhzQOIFEPHv+YPCHrfVIjxU THcI1cf6a524zoBX+r5g/5NQc9INKf4yrmQHqD2pKZ8agNqktGJ3jzQKgDhQi7viz96n WndYfmR8RNIw6gKLrFP2HvuM3r8e+S6aCeTJcmlL9AIfIAONoYzWNjUGlECRzSdLhvO0 Syfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Hfing/oj"; spf=pass (google.com: domain of linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p22-20020a05622a00d600b00425f0ca874csi14904562qtw.324.2023.12.19.06.30.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:30:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Hfing/oj"; spf=pass (google.com: domain of linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5363-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9DC481C20953 for ; Tue, 19 Dec 2023 14:30:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03C5831752; Tue, 19 Dec 2023 14:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Hfing/oj" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 17984208DB for ; Tue, 19 Dec 2023 14:26:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18750C433CD; Tue, 19 Dec 2023 14:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702996003; bh=1FNF60890FZe8kxMt43p7UTvcMY3fweSq4axrM1JM2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hfing/oj/AUYnlR4VJ/5gSwjFWNUg8N3PIlxVFK3CIXnc8hwRNNmNy/L+aGBvYA5e 2Oqig9mHjPMBybV3uklsjzh0PRaHxuvUmjt2lG0hGnPOtIYcyDCyK3jjMMgdeR28xB mO0+zN8luSltnDKZrhQBFM4jMKfyFIe+mmbpNP7M= From: Greg Kroah-Hartman To: kabel@kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 2/2] moxtet: mark moxtet_bus_type as const Date: Tue, 19 Dec 2023 15:26:39 +0100 Message-ID: <2023121939-written-guru-db83@gregkh> X-Mailer: git-send-email 2.43.0 In-Reply-To: <2023121937-pants-heroics-17c1@gregkh> References: <2023121937-pants-heroics-17c1@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 25 X-Developer-Signature: v=1; a=openpgp-sha256; l=857; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1FNF60890FZe8kxMt43p7UTvcMY3fweSq4axrM1JM2U=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNK+TXsV142/79UYHNLdanX3fb8On0hh3dorzttBPDK /0r4d9fdsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEQs8wLNgiuES/MezcBDuO Kn3DnXV1k70eOzPM98u5+DhA4PPTyzyXtjMKmb3esWO9BAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785720960537758759 X-GMAIL-MSGID: 1785720960537758759 Now that the driver core can properly handle constant struct bus_type, move the moxtet_bus_type to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: "Marek BehĂșn" Signed-off-by: Greg Kroah-Hartman --- drivers/bus/moxtet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c index 5eb0fe73ddc4..5e71b4c29992 100644 --- a/drivers/bus/moxtet.c +++ b/drivers/bus/moxtet.c @@ -102,7 +102,7 @@ static int moxtet_match(struct device *dev, struct device_driver *drv) return 0; } -static struct bus_type moxtet_bus_type = { +static const struct bus_type moxtet_bus_type = { .name = "moxtet", .dev_groups = moxtet_dev_groups, .match = moxtet_match,