Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp50071rdb; Fri, 5 Jan 2024 02:17:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IH759e1tyrpHccLFFaYxAK8HATWmBpO8q/ypzZ9+vjHlPMfPaCbTlk/7nT+hXPrSgjfa6F5 X-Received: by 2002:a17:902:680a:b0:1d4:5f18:2239 with SMTP id h10-20020a170902680a00b001d45f182239mr1672493plk.68.1704449836138; Fri, 05 Jan 2024 02:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704449836; cv=none; d=google.com; s=arc-20160816; b=LPOHvh5eut+LHDzTo4ZewPl8ysvUG99R6z8JcMT5nTJ+8FiNP9aVc95s8XfpQI5dJ5 yk1jlcKKntu/tS1bDO3roV3Xk9m8NjIYVA+e/SF9S/h31n9g6+kQE4pTrmMA+lpv5HXw R/bXGJ/cnK6rQ13K4tVzwfoj43BRvikfPYIPN6uzvxltFLBIo9jWyctALTMx6ogWAykf TUOX5is3SL6L2X3cM29dNCTcywHYCXeDLirS/+ABTto3Q/eQph/Lxg6CfDdzeUmkQxKS EK7Y8tgqvDdYA1Vtu+UqfKVRVdKPbQvsumFNi1tZj0h8o5y8rpqX2fiJ9cYiLQZJMhBy 8Sdg== 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=5EontYdZHGl1gG35c8LGpncMKFxJ9LwV2I+spvFn1KE=; fh=uaAup8lEM8HixDh6EcJZdhgsnWJdMDcdpoY8NlDtYIc=; b=hnubuXHRdSiUGksqxZwi38MP8Q0V6mUC/gMRBNNxDyJ29He9XSLrJbiC1H9QLq3lR8 AZEo9jQJ7/4gRIJwx1NWUG7qvyha/5rADEzVMYyt6pXPkQSxs/cMKVLzAm4o8GUfLCIz 21lSoGJCt4lkO0tYTLAKghZXOTEIWGCw2huPed4GGhSclo121XtUiahHADryc+jNyJSk l3x+BjHMveIpgEH0EV+bQkZBfb8JyVxsNBSrm7qWaAKUufWHQNzPX8ZWfwmgQdbWSVNj jvUDIswlNWOI22da7pr/gKtRb+kGapX1Az8sb6tfX+45sDGbsNMo7PP0QsvznNPuzup8 LFWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qB194l4N; spf=pass (google.com: domain of linux-kernel+bounces-17730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17730-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u2-20020a170902a60200b001d34798ca50si954874plq.615.2024.01.05.02.17.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 02:17:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qB194l4N; spf=pass (google.com: domain of linux-kernel+bounces-17730-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17730-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C9BD5283720 for ; Fri, 5 Jan 2024 10:17:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3FA02CCD8; Fri, 5 Jan 2024 10:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qB194l4N" 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 2E0082CCB8 for ; Fri, 5 Jan 2024 10:16:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EE13C433C7; Fri, 5 Jan 2024 10:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704449785; bh=wVz/wYYysRMvYjHcfqRSF/XdEwbeiY/IQOOSisoeE6Q=; h=From:To:Cc:Subject:Date:From; b=qB194l4NAu6JMrdnRQKjdZsb5/G+864DaGMBZOUAjETqng9gWgFFrbM796frZEKGE R3A05PU4zEgapTdDDqnaTJxR6MnFOnRi4uTt7M8DOeFikIBTQZ05fT8D5ZyYNkw4TS eq0NVna+Mr44wzibv8v9MuM3Gjo4In/uukDKLjg8= From: Greg Kroah-Hartman To: greybus-dev@lists.linaro.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Johan Hovold , Alex Elder Subject: [PATCH] greybus: make greybus_bus_type const Date: Fri, 5 Jan 2024 11:16:17 +0100 Message-ID: <2024010517-handgun-scoreless-05e7@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: 41 X-Developer-Signature: v=1; a=openpgp-sha256; l=1420; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wVz/wYYysRMvYjHcfqRSF/XdEwbeiY/IQOOSisoeE6Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDKnTr33Mnmz5Oehhg8V9+UNzi1R/L5Bp+Hpa8uGTgtNP5 nI5JH1a0RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT4dvOMD/KwWfe32dXs7S/ LGE9zvSP3/2LZRjDgpN+NwSPmyeuCD/YweS7OrZHW0tWFAA= 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 greybus_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Johan Hovold Cc: Alex Elder Cc: greybus-dev@lists.linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/greybus/core.c | 2 +- include/linux/greybus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/greybus/core.c b/drivers/greybus/core.c index 5714be740470..b0aadc1e7bbe 100644 --- a/drivers/greybus/core.c +++ b/drivers/greybus/core.c @@ -155,7 +155,7 @@ static void greybus_shutdown(struct device *dev) } } -struct bus_type greybus_bus_type = { +const struct bus_type greybus_bus_type = { .name = "greybus", .match = greybus_match_device, .uevent = greybus_uevent, diff --git a/include/linux/greybus.h b/include/linux/greybus.h index 18c0fb958b74..92da9ec4f5f0 100644 --- a/include/linux/greybus.h +++ b/include/linux/greybus.h @@ -104,7 +104,7 @@ void gb_debugfs_init(void); void gb_debugfs_cleanup(void); struct dentry *gb_debugfs_get(void); -extern struct bus_type greybus_bus_type; +extern const struct bus_type greybus_bus_type; extern struct device_type greybus_hd_type; extern struct device_type greybus_module_type; -- 2.43.0