platform/surface: aggregator: Make to_ssam_device_driver() respect constness
authorMaximilian Luz <luzmaximilian@gmail.com>
Thu, 25 May 2023 20:50:41 +0000 (22:50 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 30 May 2023 09:20:02 +0000 (11:20 +0200)
commited08d937eaa4f18aa26e47fe6b937205a4745045
tree4f709f10e9f6d54588e5d692a9e7729556361711
parent3279decb2c3c8d58cb0b70ed5235c480735a36ee
platform/surface: aggregator: Make to_ssam_device_driver() respect constness

Make to_ssam_device_driver() a bit safer by replacing container_of()
with container_of_const() to respect the constness of the passed in
pointer, instead of silently discarding any const specifications. This
change also makes it more similar to to_ssam_device(), which already
uses container_of_const().

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20230525205041.2774947-1-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
include/linux/surface_aggregator/device.h