From patchwork Fri Jan 5 10:38:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 185349 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6138139dyb; Fri, 5 Jan 2024 02:38:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUjo4obAFn5RYN2CZaseAJ9//U6qSy2GTSEI0C+PTOxDA3xbmLJIJQr89/HVi45+J58EGv X-Received: by 2002:a17:902:d502:b0:1d4:bba1:bc61 with SMTP id b2-20020a170902d50200b001d4bba1bc61mr1569685plg.119.1704451109103; Fri, 05 Jan 2024 02:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704451109; cv=none; d=google.com; s=arc-20160816; b=ABZzb5GjBYfEcJOKHrcGX3gdLRdPt3QKqiS4biB6WOJyy/dZ+Q0wTzmjIuje+WRa1o jl1rnRuEMOaIvPdobMBVVFXNenORvpxi0jjKws36ytgdR5X6R194FY8K+oC/xqUerV5x 7arCIA6xL0y9wXqcHZOaTMbpO5xEIWXIQ5MMcunMD7Q7oayKYCU+C5Qur6sw8hYX07rl oaa0lj7+FDxkjX2nehvKIi9rIjcA/NdYSL9Vf9HmrLc32blbyoccJOsoZCXh7URp+YpJ ewmMTOmHdJnTLk7rLTyzKAtx+EsIBFNXEjQdeCcbMKjog1lwFVNZfKH4ILue27DkHe6y y1hg== 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=tT37lP/Svhx+J/N1XpBD/cAMuxfHMPHUUCLQ6ELn+Bs=; fh=ptBYnWyG34EwaGNnYO2XLaKo7OwoZsKve/SN/8UkdRo=; b=PnU7oK5jL1/Mf2csReGmwRbs20IRFQ1JX6R+xLeu1YMIBRmILPXzv4ZMNnYm0JEWqh YsJsJm6OiTXvAXFYkVDiqsvQz+kSzvkefLqpVl0GR+NpANOhHd72OlST+r09Sestzmvo WU6U+9bBrKaOTNqZyWirzE4oZslvQDHd8IY8QkP5Xj+gQUcwcc1IACbiN88nEFlxwI/A stuE8lwLcB/STE0MAa2rAiPuxOIqInHuVRt+QZcBwR3uhJIQ87bvyTNjmdxDxkPgEDjp CukOzttCXd7Tor1FBK3jB4TCos+5RotygEXAFMfIkdKUGkfP+JVsZh8xTthqpbgjBWkm kP0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Mwgglcc5; spf=pass (google.com: domain of linux-kernel+bounces-17765-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17765-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w1-20020a1709027b8100b001d46b53d0b8si989751pll.585.2024.01.05.02.38.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 02:38:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17765-ouuuleilei=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=Mwgglcc5; spf=pass (google.com: domain of linux-kernel+bounces-17765-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17765-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DCB012841A1 for ; Fri, 5 Jan 2024 10:38:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2993C2C869; Fri, 5 Jan 2024 10:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Mwgglcc5" 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 7ABA22C684; Fri, 5 Jan 2024 10:38:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71E2BC433C8; Fri, 5 Jan 2024 10:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704451092; bh=OeNLZYazvQWjMT8s39DgCPZmR0L9HSAfterjuD13S8A=; h=From:To:Cc:Subject:Date:From; b=Mwgglcc5wKWFQ1eLDBVMmLd6wLzpRqri9fKcqrcQIFzQ99GCfxQdzm5+/KrSFheQs SZwv/gHc0pT6ZPDY1VhxiYV1CYRrsk9jC8O50dPB3ftQizNad+YqJ83ps+SSUNxHiH aR5mEBLVInEg6bX+TjOa9BWqgvTMPBKt/VY3BDpE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Johan Hovold , Alex Elder , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev Subject: [PATCH] staging: greybus: gbphy: make gbphy_bus_type const Date: Fri, 5 Jan 2024 11:38:08 +0100 Message-ID: <2024010508-fossil-glove-c2c6@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: 28 X-Developer-Signature: v=1; a=openpgp-sha256; l=1020; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OeNLZYazvQWjMT8s39DgCPZmR0L9HSAfterjuD13S8A=; b=owGbwMvMwCRo6H6F97bub03G02pJDKnT7wgcmqS52b/j0LyFz2cesDrT7xIfumih1xllJYGp2 yborT5i3BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATWc7NsGB74BMPFqPUr2Yb ngrsnDzvZOQc01aGOdyvIi+LXn7Ndfeot4XSFJMnV4ycGAE= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787246526327830410 X-GMAIL-MSGID: 1787246526327830410 Now that the driver core can properly handle constant struct bus_type, move the gbphy_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 Cc: linux-staging@lists.linux.dev Signed-off-by: Greg Kroah-Hartman Reviewed-by: Johan Hovold --- drivers/staging/greybus/gbphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/gbphy.c b/drivers/staging/greybus/gbphy.c index 6a7d8cf2a1eb..1c41b008ba39 100644 --- a/drivers/staging/greybus/gbphy.c +++ b/drivers/staging/greybus/gbphy.c @@ -182,7 +182,7 @@ static void gbphy_dev_remove(struct device *dev) pm_runtime_dont_use_autosuspend(dev); } -static struct bus_type gbphy_bus_type = { +static const struct bus_type gbphy_bus_type = { .name = "gbphy", .match = gbphy_dev_match, .probe = gbphy_dev_probe,