From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [PATCH 2/6] driver core: platform: fix ups for constant struct device_driver
Date: Tue, 11 Jun 2024 15:01:05 +0200 [thread overview]
Message-ID: <20240611130103.3262749-8-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20240611130103.3262749-7-gregkh@linuxfoundation.org>
Fix up a few places in the platform core code that can easily handle
struct device_driver being constant. This is part of the work to make
all struct device_driver pointers be constant.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/platform.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index c8aa1be70526..a6884479f4ac 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -1122,7 +1122,7 @@ static int platform_legacy_resume(struct device *dev)
int platform_pm_suspend(struct device *dev)
{
- struct device_driver *drv = dev->driver;
+ const struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
@@ -1140,7 +1140,7 @@ int platform_pm_suspend(struct device *dev)
int platform_pm_resume(struct device *dev)
{
- struct device_driver *drv = dev->driver;
+ const struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
@@ -1162,7 +1162,7 @@ int platform_pm_resume(struct device *dev)
int platform_pm_freeze(struct device *dev)
{
- struct device_driver *drv = dev->driver;
+ const struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
@@ -1180,7 +1180,7 @@ int platform_pm_freeze(struct device *dev)
int platform_pm_thaw(struct device *dev)
{
- struct device_driver *drv = dev->driver;
+ const struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
@@ -1198,7 +1198,7 @@ int platform_pm_thaw(struct device *dev)
int platform_pm_poweroff(struct device *dev)
{
- struct device_driver *drv = dev->driver;
+ const struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
@@ -1216,7 +1216,7 @@ int platform_pm_poweroff(struct device *dev)
int platform_pm_restore(struct device *dev)
{
- struct device_driver *drv = dev->driver;
+ const struct device_driver *drv = dev->driver;
int ret = 0;
if (!drv)
--
2.45.2
next prev parent reply other threads:[~2024-06-11 13:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 13:01 [PATCH 1/6] auxbus: make to_auxiliary_drv accept and return a constant pointer Greg Kroah-Hartman
2024-06-11 13:01 ` Greg Kroah-Hartman [this message]
2024-06-11 13:01 ` [PATCH 3/6] driver core: driver: mark driver_add/remove_groups constant Greg Kroah-Hartman
2024-06-11 13:01 ` [PATCH 4/6] driver core: make device_release_driver_internal() take a const * Greg Kroah-Hartman
2024-06-11 13:01 ` [PATCH 5/6] driver core: make driver_detach() " Greg Kroah-Hartman
2024-06-11 13:01 ` [PATCH 6/6] driver core: mark async_driver as " Greg Kroah-Hartman
2024-06-11 13:22 ` [PATCH 1/6] auxbus: make to_auxiliary_drv accept and return a constant pointer Mark Brown
2024-06-11 13:56 ` Greg Kroah-Hartman
2024-06-11 13:44 ` Sakari Ailus
2024-06-11 13:56 ` Greg Kroah-Hartman
2024-06-11 13:50 ` Przemek Kitszel
2024-06-12 8:20 ` Greg Kroah-Hartman
2024-06-12 8:15 ` Martin Habets
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240611130103.3262749-8-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox