diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-07-07 09:50:58 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-07-10 08:52:37 +0200 |
commit | 35bc3efb3157cc5a9c3b5853591c4dcef40f6029 (patch) | |
tree | 417f2079617dc5cd7e77a9529979495161839f0d /tools/testing/selftests/memory-hotplug | |
parent | ALSA: pcmtest: Convert to platform remove callback returning void (diff) | |
download | linux-35bc3efb3157cc5a9c3b5853591c4dcef40f6029.tar.xz linux-35bc3efb3157cc5a9c3b5853591c4dcef40f6029.zip |
ALSA: pcmtest: Don't use static storage to track per device data
While there is probably only ever a single instance of such a pcmtst
device, it's still bad style to use a static variable to store per
device data. Make use of platform_get_drvdata() and
platform_set_drvdata() which fixes a data corruption if there should be
two or more such devices (or this driver is used as a template for
another driver).
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230707075058.3402832-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/testing/selftests/memory-hotplug')
0 files changed, 0 insertions, 0 deletions