Message ID | 2023121908-paver-follow-cc21@gregkh |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-5490-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2022898dyi; Tue, 19 Dec 2023 07:35:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEG+TiH2k2QGpV4U2CK9RWol6dTfA7J2WCAseoF7p7Q4uyl1mpHi3Ta3Wl1w36/oc7QVcnA X-Received: by 2002:a2e:9dc6:0:b0:2cc:831f:b554 with SMTP id x6-20020a2e9dc6000000b002cc831fb554mr597072ljj.48.1703000148900; Tue, 19 Dec 2023 07:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703000148; cv=none; d=google.com; s=arc-20160816; b=bFSeuHcs4JO+9WJIf0eFpeUe4g/AI2rm65yeskS1Q/zxs1wp5Bm52vpN3RDeHXWRkk ijWGTB98kvrhCmZaDwgz07jlpDYG3P4sGoBK47a8N74ZrrSoBMwxN0bLgbI8huHEhXsp mTdjozFsruvDOT56/kktJ3E6cdsuyhq9pUuoGDjRI/Saa4A4su95faLn3Xfbu5E7FbhG kd7qeHey+JjT/Ok670O4Co0qGdy3eskACMMnCvocSze4NL0o8bi+bNnKIMm5oFNTH0lb seUoMCUv5ibQA6S1wEOfpGhF7eC6bjaoCMQuuHXmXyIi+km4UPbAOKHhsi8bbMYrlNfV wxNg== 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=4o43so9Db+cRJGyfuT/aRRB3+WzEisyY5Gw5tgLBfAc=; fh=UE//BsTiC+H/FyS9VVElOeJSXA0wOd/1nqVzwL0aBpw=; b=HF9o3MvFCjDwsOywJIL3BebH4bt5CqvLyTUxP+GEaas1nZqCufUHI9uWGzdHwYN7w0 bAsMvYgluwIZVTdtMBCFbRi1UYmB+xGuDb2w53G6Ce1SZTMyj1hZmAHW+Ksmtqwe68Sa 8ytQYDPhKPtXbIsmx+cVtWHQMxKlU4YU1OWD+McPb1x9P9fjyrJ/SRhGbskxUiX+0/II nvXJUyVfseUJGxVOoWj1Vl0AOpqSo/AylbAylarnAzn/Xd5Wva4Jxg1XmwmoLxi2xCIO npBzvvhz57YpGaZNU/WwTBuyUh/FD2xYPTt9qFmgaYIuJ+waMeipLjmuvDmyFU4iR8+c 0qPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SQb2s3ai; spf=pass (google.com: domain of linux-kernel+bounces-5490-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5490-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m15-20020a056402510f00b00553754bf7aesi1276629edd.462.2023.12.19.07.35.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:35:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5490-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SQb2s3ai; spf=pass (google.com: domain of linux-kernel+bounces-5490-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5490-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5F10B1F23319 for <ouuuleilei@gmail.com>; Tue, 19 Dec 2023 15:35:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D9C91D125; Tue, 19 Dec 2023 15:35:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SQb2s3ai" 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 8CCD21CA82 for <linux-kernel@vger.kernel.org>; Tue, 19 Dec 2023 15:35:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D889C433CB; Tue, 19 Dec 2023 15:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1703000115; bh=VQdJED1b/NVo+u44VQrG/0nsxcY5pA0NStWSLWGhQ/4=; h=From:To:Cc:Subject:Date:From; b=SQb2s3aiuJQFqu6A9r3uacHBLEChhjPJ1zyi7QABAWg3yqAzT5F0erz2jTtr4+LN+ olJJg1UCCTLzPupzeeZTdl5pTdpcGyY/lYdyJGXVTw9cNydN26OIgbsiHYmsMshuoY HzxfSq5kx4FAbzik2fJfbV/e/OB678nDugo58USA= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: rafael@kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Dave Ertman <david.m.ertman@intel.com>, Ira Weiny <ira.weiny@intel.com>, William Breathitt Gray <william.gray@linaro.org>, David Hildenbrand <david@redhat.com>, Oscar Salvador <osalvador@suse.de>, Kevin Hilman <khilman@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, Len Brown <len.brown@intel.com> Subject: [PATCH] driver core: mark remaining local bus_type variables as const Date: Tue, 19 Dec 2023 16:35:09 +0100 Message-ID: <2023121908-paver-follow-cc21@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Lines: 104 X-Developer-Signature: v=1; a=openpgp-sha256; l=3517; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VQdJED1b/NVo+u44VQrG/0nsxcY5pA0NStWSLWGhQ/4=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNO3R4fydWHduft3mD5ZQ5nloeM7nnrOwo0RaKmWigs HLKQs2lHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRdlGGBR2cJ9f/eav+Z2q1 5e1bd9/e19dy2cKw4FjufMsJFdNfXreeNlND683h/asL1QA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785725083950989301 X-GMAIL-MSGID: 1785725083950989301 |
Series |
driver core: mark remaining local bus_type variables as const
|
|
Commit Message
Greg KH
Dec. 19, 2023, 3:35 p.m. UTC
Now that the driver core can properly handle constant struct bus_type,
change the local driver core bus_type variables to be a constant
structure as well, placing them into read-only memory which can not be
modified at runtime.
Cc: Dave Ertman <david.m.ertman@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: William Breathitt Gray <william.gray@linaro.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/auxiliary.c | 2 +-
drivers/base/isa.c | 2 +-
drivers/base/memory.c | 2 +-
drivers/base/node.c | 2 +-
drivers/base/power/domain.c | 2 +-
drivers/base/soc.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
Comments
> -----Original Message----- > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Sent: Tuesday, December 19, 2023 7:35 AM > To: rafael@kernel.org; linux-kernel@vger.kernel.org > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Ertman, David M > <david.m.ertman@intel.com>; Weiny, Ira <ira.weiny@intel.com>; William > Breathitt Gray <william.gray@linaro.org>; David Hildenbrand > <david@redhat.com>; Oscar Salvador <osalvador@suse.de>; Kevin Hilman > <khilman@kernel.org>; Ulf Hansson <ulf.hansson@linaro.org>; Brown, Len > <len.brown@intel.com> > Subject: [PATCH] driver core: mark remaining local bus_type variables as > const > > Now that the driver core can properly handle constant struct bus_type, > change the local driver core bus_type variables to be a constant > structure as well, placing them into read-only memory which can not be > modified at runtime. > > Cc: Dave Ertman <david.m.ertman@intel.com> > Cc: Ira Weiny <ira.weiny@intel.com> > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > Cc: William Breathitt Gray <william.gray@linaro.org> > Cc: David Hildenbrand <david@redhat.com> > Cc: Oscar Salvador <osalvador@suse.de> > Cc: Kevin Hilman <khilman@kernel.org> > Cc: Ulf Hansson <ulf.hansson@linaro.org> > Cc: Len Brown <len.brown@intel.com> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- > drivers/base/auxiliary.c | 2 +- > drivers/base/isa.c | 2 +- > drivers/base/memory.c | 2 +- > drivers/base/node.c | 2 +- > drivers/base/power/domain.c | 2 +- > drivers/base/soc.c | 2 +- > 6 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c > index 4d4c2c8d26c4..d3a2c40c2f12 100644 > --- a/drivers/base/auxiliary.c > +++ b/drivers/base/auxiliary.c > @@ -244,7 +244,7 @@ static void auxiliary_bus_shutdown(struct device > *dev) > auxdrv->shutdown(auxdev); > } > > -static struct bus_type auxiliary_bus_type = { > +static const struct bus_type auxiliary_bus_type = { > .name = "auxiliary", > .probe = auxiliary_bus_probe, > .remove = auxiliary_bus_remove, > diff --git a/drivers/base/isa.c b/drivers/base/isa.c > index 675ad3139224..e23d0b49a793 100644 > --- a/drivers/base/isa.c > +++ b/drivers/base/isa.c LGTM - ACK DaveE
On Tue, Dec 19, 2023 at 06:02:33PM +0000, Ertman, David M wrote: > > -----Original Message----- > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Sent: Tuesday, December 19, 2023 7:35 AM > > To: rafael@kernel.org; linux-kernel@vger.kernel.org > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Ertman, David M > > <david.m.ertman@intel.com>; Weiny, Ira <ira.weiny@intel.com>; William > > Breathitt Gray <william.gray@linaro.org>; David Hildenbrand > > <david@redhat.com>; Oscar Salvador <osalvador@suse.de>; Kevin Hilman > > <khilman@kernel.org>; Ulf Hansson <ulf.hansson@linaro.org>; Brown, Len > > <len.brown@intel.com> > > Subject: [PATCH] driver core: mark remaining local bus_type variables as > > const > > > > Now that the driver core can properly handle constant struct bus_type, > > change the local driver core bus_type variables to be a constant > > structure as well, placing them into read-only memory which can not be > > modified at runtime. > > > > Cc: Dave Ertman <david.m.ertman@intel.com> > > Cc: Ira Weiny <ira.weiny@intel.com> > > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > > Cc: William Breathitt Gray <william.gray@linaro.org> > > Cc: David Hildenbrand <david@redhat.com> > > Cc: Oscar Salvador <osalvador@suse.de> > > Cc: Kevin Hilman <khilman@kernel.org> > > Cc: Ulf Hansson <ulf.hansson@linaro.org> > > Cc: Len Brown <len.brown@intel.com> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > --- > > drivers/base/auxiliary.c | 2 +- > > drivers/base/isa.c | 2 +- > > drivers/base/memory.c | 2 +- > > drivers/base/node.c | 2 +- > > drivers/base/power/domain.c | 2 +- > > drivers/base/soc.c | 2 +- > > 6 files changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c > > index 4d4c2c8d26c4..d3a2c40c2f12 100644 > > --- a/drivers/base/auxiliary.c > > +++ b/drivers/base/auxiliary.c > > @@ -244,7 +244,7 @@ static void auxiliary_bus_shutdown(struct device > > *dev) > > auxdrv->shutdown(auxdev); > > } > > > > -static struct bus_type auxiliary_bus_type = { > > +static const struct bus_type auxiliary_bus_type = { > > .name = "auxiliary", > > .probe = auxiliary_bus_probe, > > .remove = auxiliary_bus_remove, > > diff --git a/drivers/base/isa.c b/drivers/base/isa.c > > index 675ad3139224..e23d0b49a793 100644 > > --- a/drivers/base/isa.c > > +++ b/drivers/base/isa.c > > LGTM - ACK So, is that an "Acked-by:" type response? We need something standard for our tools to pick up... thanks, greg k-h
> -----Original Message----- > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Sent: Tuesday, December 19, 2023 10:13 AM > To: Ertman, David M <david.m.ertman@intel.com> > Cc: rafael@kernel.org; linux-kernel@vger.kernel.org; Weiny, Ira > <ira.weiny@intel.com>; William Breathitt Gray <william.gray@linaro.org>; > David Hildenbrand <david@redhat.com>; Oscar Salvador > <osalvador@suse.de>; Kevin Hilman <khilman@kernel.org>; Ulf Hansson > <ulf.hansson@linaro.org>; Brown, Len <len.brown@intel.com> > Subject: Re: [PATCH] driver core: mark remaining local bus_type variables as > const > > On Tue, Dec 19, 2023 at 06:02:33PM +0000, Ertman, David M wrote: > > > -----Original Message----- > > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > Sent: Tuesday, December 19, 2023 7:35 AM > > > To: rafael@kernel.org; linux-kernel@vger.kernel.org > > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Ertman, David > M > > > <david.m.ertman@intel.com>; Weiny, Ira <ira.weiny@intel.com>; > William > > > Breathitt Gray <william.gray@linaro.org>; David Hildenbrand > > > <david@redhat.com>; Oscar Salvador <osalvador@suse.de>; Kevin > Hilman > > > <khilman@kernel.org>; Ulf Hansson <ulf.hansson@linaro.org>; Brown, > Len > > > <len.brown@intel.com> > > > Subject: [PATCH] driver core: mark remaining local bus_type variables as > > > const > > > > > > Now that the driver core can properly handle constant struct bus_type, > > > change the local driver core bus_type variables to be a constant > > > structure as well, placing them into read-only memory which can not be > > > modified at runtime. > > > > > > Cc: Dave Ertman <david.m.ertman@intel.com> > > > Cc: Ira Weiny <ira.weiny@intel.com> > > > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > > > Cc: William Breathitt Gray <william.gray@linaro.org> > > > Cc: David Hildenbrand <david@redhat.com> > > > Cc: Oscar Salvador <osalvador@suse.de> > > > Cc: Kevin Hilman <khilman@kernel.org> > > > Cc: Ulf Hansson <ulf.hansson@linaro.org> > > > Cc: Len Brown <len.brown@intel.com> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > --- > > > drivers/base/auxiliary.c | 2 +- > > > drivers/base/isa.c | 2 +- > > > drivers/base/memory.c | 2 +- > > > drivers/base/node.c | 2 +- > > > drivers/base/power/domain.c | 2 +- > > > drivers/base/soc.c | 2 +- > > > 6 files changed, 6 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c > > > index 4d4c2c8d26c4..d3a2c40c2f12 100644 > > > --- a/drivers/base/auxiliary.c > > > +++ b/drivers/base/auxiliary.c > > > @@ -244,7 +244,7 @@ static void auxiliary_bus_shutdown(struct device > > > *dev) > > > auxdrv->shutdown(auxdev); > > > } > > > > > > -static struct bus_type auxiliary_bus_type = { > > > +static const struct bus_type auxiliary_bus_type = { > > > .name = "auxiliary", > > > .probe = auxiliary_bus_probe, > > > .remove = auxiliary_bus_remove, > > > diff --git a/drivers/base/isa.c b/drivers/base/isa.c > > > index 675ad3139224..e23d0b49a793 100644 > > > --- a/drivers/base/isa.c > > > +++ b/drivers/base/isa.c > > > > LGTM - ACK > > So, is that an "Acked-by:" type response? We need something standard > for our tools to pick up... > > thanks, > > greg k-h Sorry about that :) Acked-by: Dave Ertman <david.m.ertman@intel.com>
On Tue, Dec 19, 2023 at 04:35:09PM +0100, Greg Kroah-Hartman wrote: > Now that the driver core can properly handle constant struct bus_type, > change the local driver core bus_type variables to be a constant > structure as well, placing them into read-only memory which can not be > modified at runtime. > > Cc: Dave Ertman <david.m.ertman@intel.com> > Cc: Ira Weiny <ira.weiny@intel.com> > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > Cc: William Breathitt Gray <william.gray@linaro.org> > Cc: David Hildenbrand <david@redhat.com> > Cc: Oscar Salvador <osalvador@suse.de> > Cc: Kevin Hilman <khilman@kernel.org> > Cc: Ulf Hansson <ulf.hansson@linaro.org> > Cc: Len Brown <len.brown@intel.com> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: William Breathitt Gray <william.gray@linaro.org>
On Tue, 19 Dec 2023 at 16:35, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > > Now that the driver core can properly handle constant struct bus_type, > change the local driver core bus_type variables to be a constant > structure as well, placing them into read-only memory which can not be > modified at runtime. > > Cc: Dave Ertman <david.m.ertman@intel.com> > Cc: Ira Weiny <ira.weiny@intel.com> > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > Cc: William Breathitt Gray <william.gray@linaro.org> > Cc: David Hildenbrand <david@redhat.com> > Cc: Oscar Salvador <osalvador@suse.de> > Cc: Kevin Hilman <khilman@kernel.org> > Cc: Ulf Hansson <ulf.hansson@linaro.org> > Cc: Len Brown <len.brown@intel.com> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- > drivers/base/auxiliary.c | 2 +- > drivers/base/isa.c | 2 +- > drivers/base/memory.c | 2 +- > drivers/base/node.c | 2 +- > drivers/base/power/domain.c | 2 +- This above file has moved to drivers/pmdomain/core.c and I am carrying that patch in my pmdomain tree. If you have the time to send a separate patch for it, I can pick it up. Kind regards Uffe
On Wed, Jan 03, 2024 at 02:24:05PM +0100, Ulf Hansson wrote: > On Tue, 19 Dec 2023 at 16:35, Greg Kroah-Hartman > <gregkh@linuxfoundation.org> wrote: > > > > Now that the driver core can properly handle constant struct bus_type, > > change the local driver core bus_type variables to be a constant > > structure as well, placing them into read-only memory which can not be > > modified at runtime. > > > > Cc: Dave Ertman <david.m.ertman@intel.com> > > Cc: Ira Weiny <ira.weiny@intel.com> > > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > > Cc: William Breathitt Gray <william.gray@linaro.org> > > Cc: David Hildenbrand <david@redhat.com> > > Cc: Oscar Salvador <osalvador@suse.de> > > Cc: Kevin Hilman <khilman@kernel.org> > > Cc: Ulf Hansson <ulf.hansson@linaro.org> > > Cc: Len Brown <len.brown@intel.com> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > --- > > drivers/base/auxiliary.c | 2 +- > > drivers/base/isa.c | 2 +- > > drivers/base/memory.c | 2 +- > > drivers/base/node.c | 2 +- > > drivers/base/power/domain.c | 2 +- > > This above file has moved to drivers/pmdomain/core.c and I am carrying > that patch in my pmdomain tree. If you have the time to send a > separate patch for it, I can pick it up. This is already in my tree and in linux-next, so all should be good. thanks, greg k-h
diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c index 4d4c2c8d26c4..d3a2c40c2f12 100644 --- a/drivers/base/auxiliary.c +++ b/drivers/base/auxiliary.c @@ -244,7 +244,7 @@ static void auxiliary_bus_shutdown(struct device *dev) auxdrv->shutdown(auxdev); } -static struct bus_type auxiliary_bus_type = { +static const struct bus_type auxiliary_bus_type = { .name = "auxiliary", .probe = auxiliary_bus_probe, .remove = auxiliary_bus_remove, diff --git a/drivers/base/isa.c b/drivers/base/isa.c index 675ad3139224..e23d0b49a793 100644 --- a/drivers/base/isa.c +++ b/drivers/base/isa.c @@ -82,7 +82,7 @@ static int isa_bus_resume(struct device *dev) return 0; } -static struct bus_type isa_bus_type = { +static const struct bus_type isa_bus_type = { .name = "isa", .match = isa_bus_match, .probe = isa_bus_probe, diff --git a/drivers/base/memory.c b/drivers/base/memory.c index f3b9a4d0fa3b..4ac3266da6b5 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -68,7 +68,7 @@ static inline unsigned long phys_to_block_id(unsigned long phys) static int memory_subsys_online(struct device *dev); static int memory_subsys_offline(struct device *dev); -static struct bus_type memory_subsys = { +static const struct bus_type memory_subsys = { .name = MEMORY_CLASS_NAME, .dev_name = MEMORY_CLASS_NAME, .online = memory_subsys_online, diff --git a/drivers/base/node.c b/drivers/base/node.c index 4d588f4658c8..433897eecbdc 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -21,7 +21,7 @@ #include <linux/swap.h> #include <linux/slab.h> -static struct bus_type node_subsys = { +static const struct bus_type node_subsys = { .name = "node", .dev_name = "node", }; diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index da1777e39eaa..096871334cc7 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2670,7 +2670,7 @@ static void genpd_release_dev(struct device *dev) kfree(dev); } -static struct bus_type genpd_bus_type = { +static const struct bus_type genpd_bus_type = { .name = "genpd", }; diff --git a/drivers/base/soc.c b/drivers/base/soc.c index c741d0845852..282c38aece0d 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -28,7 +28,7 @@ struct soc_device { int soc_dev_num; }; -static struct bus_type soc_bus_type = { +static const struct bus_type soc_bus_type = { .name = "soc", }; static bool soc_bus_registered;