Re: [PATCH 1/3] ASoC: soc-core: add component remove/unregister_exp/lookup functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 25, 2017 at 04:00:48AM +0000, Kuninori Morimoto wrote:

> ALSA SoC platform/codec will be replaced to component soon.
> This means 1 device might have multiple components. But current
> unregister component function only checks "dev" to find it.
> This means, unexpected component might be unregistered by current
> function.
> But, it is no problem if driver registered only 1 component.

Isn't this just a convenience for drivers though?  It means they can
just clean things up with one call and I'm having a hard time thinking
of any use cases for only unregistering some components.

> To avoid this issue, this patch adds new component
> unregister_exp/lookup/remove functions. "lookup" function finds
> component by "dev" and "driver name", and "remove" function removes it.
> "unregister_exp" will use these functions.

The exp name here seems a bit confusing...  perhaps just _internal() or
something?

> +#define snd_soc_unregister_component(dev) snd_soc_unregister_component_exp(dev, NULL)

A static inline is better, it's got better type safety.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux