Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

driver core: platform: fix ups for constant struct device_driver

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>
Link: https://lore.kernel.org/r/20240611130103.3262749-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+6 -6
+6 -6
drivers/base/platform.c
··· 1122 1122 1123 1123 int platform_pm_suspend(struct device *dev) 1124 1124 { 1125 - struct device_driver *drv = dev->driver; 1125 + const struct device_driver *drv = dev->driver; 1126 1126 int ret = 0; 1127 1127 1128 1128 if (!drv) ··· 1140 1140 1141 1141 int platform_pm_resume(struct device *dev) 1142 1142 { 1143 - struct device_driver *drv = dev->driver; 1143 + const struct device_driver *drv = dev->driver; 1144 1144 int ret = 0; 1145 1145 1146 1146 if (!drv) ··· 1162 1162 1163 1163 int platform_pm_freeze(struct device *dev) 1164 1164 { 1165 - struct device_driver *drv = dev->driver; 1165 + const struct device_driver *drv = dev->driver; 1166 1166 int ret = 0; 1167 1167 1168 1168 if (!drv) ··· 1180 1180 1181 1181 int platform_pm_thaw(struct device *dev) 1182 1182 { 1183 - struct device_driver *drv = dev->driver; 1183 + const struct device_driver *drv = dev->driver; 1184 1184 int ret = 0; 1185 1185 1186 1186 if (!drv) ··· 1198 1198 1199 1199 int platform_pm_poweroff(struct device *dev) 1200 1200 { 1201 - struct device_driver *drv = dev->driver; 1201 + const struct device_driver *drv = dev->driver; 1202 1202 int ret = 0; 1203 1203 1204 1204 if (!drv) ··· 1216 1216 1217 1217 int platform_pm_restore(struct device *dev) 1218 1218 { 1219 - struct device_driver *drv = dev->driver; 1219 + const struct device_driver *drv = dev->driver; 1220 1220 int ret = 0; 1221 1221 1222 1222 if (!drv)