Message ID | 20220214060819.7334-21-yong.wu@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | component: Add common helpers for compare/release | expand |
On Mon, Feb 14, 2022 at 02:08:16PM +0800, Yong Wu wrote:
> Use the common compare/release helpers from component.
What's the story with dependencies here? I've just got this one patch
with no cover letter...
Il 14/02/22 13:40, Mark Brown ha scritto: > On Mon, Feb 14, 2022 at 02:08:16PM +0800, Yong Wu wrote: >> Use the common compare/release helpers from component. > > What's the story with dependencies here? I've just got this one patch > with no cover letter... Hello Mark, I agree, the cover letter should be sent to everyone; Yong, please add the proper Ccs to it next time. Anyway, context: https://patchwork.kernel.org/project/linux-mediatek/cover/20220214060819.7334-1-yong.wu@mediatek.com/ Cheers, Angelo
On Mon, 2022-02-14 at 13:43 +0100, AngeloGioacchino Del Regno wrote: > Il 14/02/22 13:40, Mark Brown ha scritto: > > On Mon, Feb 14, 2022 at 02:08:16PM +0800, Yong Wu wrote: > > > Use the common compare/release helpers from component. > > > > What's the story with dependencies here? I've just got this one > > patch > > with no cover letter... Sorry for this. I will add in cover letter next time. Maybe in next week. Just to see if there is any other comment. Thanks. > > Hello Mark, > I agree, the cover letter should be sent to everyone; Yong, please > add the > proper Ccs to it next time. > > Anyway, context: > https://patchwork.kernel.org/project/linux-mediatek/cover/20220214060819.7334-1-yong.wu@mediatek.com/ Thanks very much:) > > Cheers, > Angelo
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index eff200a07d9f..54f4a41ceca2 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -4417,16 +4417,6 @@ static const struct component_master_ops wcd938x_comp_ops = { .unbind = wcd938x_unbind, }; -static int wcd938x_compare_of(struct device *dev, void *data) -{ - return dev->of_node == data; -} - -static void wcd938x_release_of(struct device *dev, void *data) -{ - of_node_put(data); -} - static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, struct device *dev, struct component_match **matchptr) @@ -4442,8 +4432,8 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, } of_node_get(wcd938x->rxnode); - component_match_add_release(dev, matchptr, wcd938x_release_of, - wcd938x_compare_of, wcd938x->rxnode); + component_match_add_release(dev, matchptr, component_release_of, + component_compare_of, wcd938x->rxnode); wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0); if (!wcd938x->txnode) { @@ -4451,8 +4441,8 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x, return -ENODEV; } of_node_get(wcd938x->txnode); - component_match_add_release(dev, matchptr, wcd938x_release_of, - wcd938x_compare_of, wcd938x->txnode); + component_match_add_release(dev, matchptr, component_release_of, + component_compare_of, wcd938x->txnode); return 0; }
Use the common compare/release helpers from component. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Yong Wu <yong.wu@mediatek.com> --- sound/soc/codecs/wcd938x.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-)