aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2021-07-15 09:58:27 +0200
committerTakashi Iwai <[email protected]>2021-07-19 16:16:36 +0200
commit7835e0901e245aa8b83d7e2964f17088cb2e1f1e (patch)
tree419851236e88ba39c089447059d61ddae3ced3dd /tools/perf/scripts/python/libxed.py
parentac327f1b10bca6cee8f1a427e5ba451e2d69c710 (diff)
ALSA: intel8x0: Allocate resources with device-managed APIs
This patch refactors the intel8x0 and intel8x0m driver codes using devres and gets rid of the driver remove callback. The conversion is fairly straightforward: each API call is replaced with the device-managed API function, e.g. pci_enable_device() -> pcim_enable_device(), and so on. The buffer descriptor list is allocated with a new API, snd_devm_alloc_pages(). A slight code structure change is that the intel8x0 object is allocated as a card's private_data instead of the own lowlevel snd_device object. This simplifies the resource management. And, the take-down procedure is triggered via card->private_free, and it's registered at the end of the whole initialization, i.e. after the all resources get properly managed. The only not-devres-managed resource is the irq handler. Since we need to release at suspend and re-acquire at resume (otherwise something weird happens on some machines), this is still managed manually. But the rest are all freed automatically. The end result is a good amount of code reduction. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions