Greg Kroah-Hartman
d69d804845
driver core: have match() callback in struct bus_type take a const *
...
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *. This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.
Because the match() callback is in all busses, all busses are modified
to handle this properly. This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.
For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.
Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Alex Elder <elder@kernel.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 15:16:54 +02:00
..
2023-11-30 12:12:39 +00:00
2024-05-06 10:05:23 +09:00
2024-04-30 23:40:28 +09:00
2024-04-30 23:40:28 +09:00
2023-03-11 12:34:01 +00:00
2022-12-29 13:22:04 +00:00
2024-04-15 10:17:25 +09:00
2024-03-25 20:30:06 +00:00
2023-08-14 13:10:48 +01:00
2023-09-11 01:31:52 +01:00
2024-04-30 23:57:26 +09:00
2023-09-11 01:31:54 +01:00
2023-09-25 16:27:48 +02:00
2024-02-08 11:54:48 +00:00
2024-03-25 20:30:07 +00:00
2024-03-28 21:09:45 +00:00
2024-04-14 16:54:01 +09:00
2023-08-07 14:38:23 +01:00
2023-08-07 14:38:24 +01:00
2024-02-05 14:35:44 +00:00
2023-09-11 01:31:57 +01:00
2024-01-23 13:28:03 +00:00
2022-10-18 19:16:53 +01:00
2023-08-14 13:10:59 +01:00
2023-07-11 13:41:20 +01:00
2024-05-03 11:09:30 +09:00
2023-03-06 12:31:15 +00:00
2024-02-08 11:54:48 +00:00
2024-04-26 11:09:25 +09:00
2024-05-29 13:43:02 +01:00
2024-01-23 13:28:05 +00:00
2023-08-07 14:38:29 +01:00
2023-09-11 01:31:59 +01:00
2024-02-08 11:54:50 +00:00
2024-02-08 11:54:50 +00:00
2023-08-07 14:38:28 +01:00
2024-03-28 13:58:41 +00:00
2024-04-19 09:44:28 +09:00
2024-02-08 11:54:48 +00:00
2023-08-07 14:38:32 +01:00
2023-09-11 01:32:01 +01:00
2024-05-03 11:09:23 +09:00
2024-02-15 14:17:19 +00:00
2024-05-09 17:48:06 +02:00
2021-11-16 14:30:05 +00:00
2024-05-03 11:09:24 +09:00
2023-08-14 13:10:50 +01:00
2023-08-14 13:10:51 +01:00
2023-08-14 13:10:52 +01:00
2024-03-28 21:09:46 +00:00
2024-03-28 21:09:46 +00:00
2024-03-28 13:58:42 +00:00
2023-08-14 13:10:54 +01:00
2024-02-08 11:54:59 +00:00
2023-07-25 17:40:28 +01:00
2024-04-30 23:57:27 +09:00
2023-08-14 13:10:55 +01:00
2024-03-28 21:09:46 +00:00
2024-02-08 11:54:51 +00:00
2024-02-08 11:54:48 +00:00
2023-09-27 17:06:36 +02:00
2024-04-16 19:59:48 +09:00
2024-01-23 15:05:18 +00:00
2023-08-14 13:11:01 +01:00
2024-04-30 23:57:28 +09:00
2023-11-20 13:13:37 +00:00
2024-02-12 13:41:35 +00:00
2022-02-14 12:53:09 +00:00
2024-02-05 14:35:47 +00:00
2022-02-14 12:53:09 +00:00
2023-08-21 13:10:56 +01:00
2023-08-14 13:11:05 +01:00
2023-09-11 01:32:03 +01:00
2023-12-11 12:55:16 +00:00
2024-03-18 15:55:12 +00:00
2023-07-31 15:57:09 +01:00
2023-07-31 15:57:09 +01:00
2023-07-31 15:57:09 +01:00
2023-07-31 15:57:09 +01:00
2024-03-28 13:58:40 +00:00
2023-09-11 01:31:31 +01:00
2024-03-14 14:14:20 +00:00
2023-09-11 22:43:17 +01:00
2023-09-11 22:43:17 +01:00
2024-05-09 06:59:19 +02:00
2023-09-11 22:43:17 +01:00
2023-10-06 12:34:31 +01:00
2023-12-08 20:13:24 +00:00
2023-09-11 01:31:35 +01:00
2024-03-25 15:03:03 +00:00
2024-03-25 15:03:02 +00:00
2023-09-11 01:31:39 +01:00
2023-09-11 22:43:17 +01:00
2024-04-23 10:39:49 +09:00
2023-09-11 01:31:42 +01:00
2024-02-13 15:48:22 +00:00
2023-11-30 12:12:39 +00:00
2023-09-11 01:31:43 +01:00
2024-01-22 00:06:54 +00:00
2024-04-17 23:01:11 +09:00
2024-03-28 15:52:33 +00:00
2024-02-08 11:54:48 +00:00
2023-09-11 01:32:09 +01:00
2024-04-03 11:04:58 +01:00
2024-04-30 23:57:29 +09:00
2024-04-30 23:57:30 +09:00
2023-12-15 12:58:18 +00:00
2024-03-18 17:30:46 +00:00
2024-05-03 11:11:36 +09:00
2024-05-03 11:11:35 +09:00
2024-05-03 11:11:38 +09:00
2024-05-03 11:11:38 +09:00
2023-08-21 14:29:25 +01:00
2023-09-25 14:19:38 +02:00
2023-08-21 14:29:27 +01:00
2023-08-21 14:29:28 +01:00
2023-08-21 14:29:29 +01:00
2024-02-05 14:35:49 +00:00
2023-08-16 12:58:08 +01:00
2024-03-25 17:18:22 +00:00
2023-10-09 13:14:28 +01:00
2024-04-24 10:27:16 +09:00
2023-08-21 14:29:33 +01:00
2023-08-21 14:29:34 +01:00
2024-01-30 15:27:21 +00:00
2024-02-08 11:54:48 +00:00
2023-08-21 14:29:37 +01:00
2023-08-21 14:29:38 +01:00
2024-02-08 11:54:53 +00:00
2022-02-09 13:00:45 +00:00
2022-02-09 13:00:45 +00:00
2023-08-21 14:29:39 +01:00
2023-12-11 12:54:53 +00:00
2023-12-11 12:54:53 +00:00
2023-12-11 12:54:54 +00:00
2024-02-29 11:40:47 +00:00
2024-05-29 19:12:09 +01:00
2024-04-30 23:57:30 +09:00
2024-04-30 23:57:31 +09:00
2023-12-11 12:54:59 +00:00
2023-12-11 12:55:00 +00:00
2023-12-11 12:55:03 +00:00
2023-12-11 12:55:04 +00:00
2023-12-11 12:55:02 +00:00
2023-12-11 12:55:05 +00:00
2023-12-11 12:55:06 +00:00
2022-02-09 13:00:45 +00:00
2023-12-11 12:55:07 +00:00
2023-12-11 12:55:08 +00:00
2023-12-11 12:55:06 +00:00
2023-12-11 12:55:09 +00:00
2024-02-08 11:54:48 +00:00
2024-04-30 23:57:32 +09:00
2024-02-08 11:54:48 +00:00
2023-12-11 12:55:13 +00:00
2023-12-11 12:55:14 +00:00
2024-07-03 15:16:54 +02:00
2024-02-08 11:54:53 +00:00