staging: bcm2835-audio: Simplify card object management
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 Sep 2018 15:58:58 +0000 (17:58 +0200)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:31 +0000 (00:08 +0100)
commit73d5cb9b8326f904a781233e9e50419811c1920c
tree43717dce4e08eba78a3935747beafdf24fd8718c
parent7cf1ddf5a2281dfdf27f196e70c72206f9a93a55
staging: bcm2835-audio: Simplify card object management

commit 872ae2d63d516a2a3b9c833d8685afcfa7814542 upstream.

Instead of creating a dummy child device to manage the card object,
just use devm stuff directly for releasing with snd_card_free().
This results in a lot of code reduction.

Since the dummy child devices are gone, the device object to be passed
to the memory allocator needs to be adjusted as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
drivers/staging/vc04_services/bcm2835-audio/bcm2835.c