Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp554736rdh; Tue, 19 Dec 2023 07:01:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2ZsJk/QCJZ5RTmBuXgmucEhgObjdnCU43GlIpjP6rC/rHcKLBJmigPGl+veEUHkOR43YR X-Received: by 2002:ad4:5aac:0:b0:67f:1ba0:5be8 with SMTP id u12-20020ad45aac000000b0067f1ba05be8mr2053564qvg.55.1702998099921; Tue, 19 Dec 2023 07:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702998099; cv=none; d=google.com; s=arc-20160816; b=onVevxI1TM8MaBrNXT+nWPP/86w3VDoBJyYKPVTtVA1tNTiiMJf3ZqU56BtGFiN9iV O3PzmmT+bA8BoDPfOg4cwGOUILfvt3k7MnnZuVjl/aTLoz77VAiKLHEIPH5nEK75MFz8 /4IQTu5GZNJie2hsoiTmi5LLJ/w6kSSWdM/HlNNMoYPnS2NGbi4rLKFYOVuw3Q9KK4rP YfMsy5TFS3XKpivKd4t776BSTIQh9b53CsFpavXW1BpWVSnD4JO9xDQJwEzQuH5fGg+5 pqObxEdR6ZcFPUixbvmBrahqmneCOU0s3OtkzMCoIrWDYeLh/ar//fpTrxcQD7Ql2bIJ cSfA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=B/JourYvPu8j5vMW8eZrSKNRqMNHyVoKHiK0exVwWA4=; fh=Rnl+597nNzusqmhBsBL8ayx1jtgOuOrf0hM2xaLKUoA=; b=edtrNYCG0Enny0QY9KfT7T81g/+faqKCluUk1VpPKrmVNh3SApiphg3verzvs+ufBh 6PgsgGNrmjY4pdiXPxvXXnzgBNZSvmukDm0xKGD2W6MuKdzwxDwp1rQE0thZIx7f+onB YxCyIyshpbQairmGJqtwyMX5/mlPToh6rKXXhYYSXBJXUYBadjwZcwb/vY2n5eriXKx6 N6n2aJAMy/E3cTdEiecE0YsReaU5/6wQ8MTgr6alXiRv04HNqB7SuTKnu5jTLDzmlGKJ MZHpuLyf6+D2rBg/2pWyH/abE/MZYYIj0XzTacmJQcq9ulOauJpUsBH21xLrj2SP2onY 6+sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=g1S8dD3q; spf=pass (google.com: domain of linux-kernel+bounces-5442-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r17-20020a0cb291000000b0067f42e7222asi4936124qve.215.2023.12.19.07.01.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5442-linux.lists.archive=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=g1S8dD3q; spf=pass (google.com: domain of linux-kernel+bounces-5442-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5442-linux.lists.archive=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 65A6C1C2451F for ; Tue, 19 Dec 2023 15:01:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26E26249FE; Tue, 19 Dec 2023 14:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="g1S8dD3q" 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 285AA225CE for ; Tue, 19 Dec 2023 14:59:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11A8EC433C7; Tue, 19 Dec 2023 14:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702997978; bh=bKz5Q4Qy/sBsZu1LZlfLjyOnvOVPI9R51wTQNAhVVW4=; h=From:To:Cc:Subject:Date:From; b=g1S8dD3qjeXrguxIao5wJQiC+U9ZBZspHxIH1XFhQBZHR4tgqvbonfK2xp1CMLLl0 VhTQmFFO8yqbIfbZk8GVPkwDr0SW1uTqiXa7nXF2vwmOWyx8TcTcT1Pj3ZnLQVXDWt 3h9rVXYDyrtfkj+a4TmNUP7JsyTd+uGgU/eq3NtA= From: Greg Kroah-Hartman To: o-takashi@sakamocchi.jp Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , linux1394-devel@lists.sourceforge.net Subject: [PATCH] firewire: make fw_bus_type const Date: Tue, 19 Dec 2023 15:59:32 +0100 Message-ID: <2023121931-skydiver-dodgy-d1bd@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 40 X-Developer-Signature: v=1; a=openpgp-sha256; l=1531; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bKz5Q4Qy/sBsZu1LZlfLjyOnvOVPI9R51wTQNAhVVW4=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmN6y+/b1uw/mhkQW3rDCHjeavYjFfvijMO/MrioMnDH jeV1/RvRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkqxTD/OS8eN5LYmlc4XJl TMFvy18+Lz20iWHBuQ/CFd/3bbzycpIYC7dHepuPp1suAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Now that the driver core can properly handle constant struct bus_type, move the fw_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Takashi Sakamoto Cc: linux1394-devel@lists.sourceforge.net Signed-off-by: Greg Kroah-Hartman --- drivers/firewire/core-device.c | 2 +- include/linux/firewire.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index aa597cda0d88..eeda7cc59e27 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -219,7 +219,7 @@ static int fw_unit_uevent(const struct device *dev, struct kobj_uevent_env *env) return 0; } -struct bus_type fw_bus_type = { +const struct bus_type fw_bus_type = { .name = "firewire", .match = fw_unit_match, .probe = fw_unit_probe, diff --git a/include/linux/firewire.h b/include/linux/firewire.h index bd3fc75d4f14..dd9f2d765e68 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h @@ -75,7 +75,7 @@ void fw_csr_iterator_init(struct fw_csr_iterator *ci, const u32 *p); int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value); int fw_csr_string(const u32 *directory, int key, char *buf, size_t size); -extern struct bus_type fw_bus_type; +extern const struct bus_type fw_bus_type; struct fw_card_driver; struct fw_node; -- 2.43.0