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.

drm/simpledrm: Do not upcast in release helpers

The res pointer passed to simpledrm_device_release_clocks() and
simpledrm_device_release_regulators() points to an instance of
struct simpledrm_device. No need to upcast from struct drm_device.
The upcast is harmless, as DRM device is the first field in struct
simpledrm_device.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
Cc: <stable@vger.kernel.org> # v5.14+
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250407134753.985925-2-tzimmermann@suse.de

+2 -2
+2 -2
drivers/gpu/drm/sysfb/simpledrm.c
··· 275 275 276 276 static void simpledrm_device_release_clocks(void *res) 277 277 { 278 - struct simpledrm_device *sdev = simpledrm_device_of_dev(res); 278 + struct simpledrm_device *sdev = res; 279 279 unsigned int i; 280 280 281 281 for (i = 0; i < sdev->clk_count; ++i) { ··· 373 373 374 374 static void simpledrm_device_release_regulators(void *res) 375 375 { 376 - struct simpledrm_device *sdev = simpledrm_device_of_dev(res); 376 + struct simpledrm_device *sdev = res; 377 377 unsigned int i; 378 378 379 379 for (i = 0; i < sdev->regulator_count; ++i) {