]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: cs_dsp: Don't require client to provide a struct cs_dsp_client_ops
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Fri, 28 Nov 2025 10:21:31 +0000 (10:21 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 28 Nov 2025 11:47:55 +0000 (11:47 +0000)
commitaf37511305c0da1d151cc9a1ee6077c2cbde4f1d
tree1afa67781ffb683a1d9bb8c00f60d1ca7b806783
parenta76e1d951f530385ef8e62ed904a496d3203045d
firmware: cs_dsp: Don't require client to provide a struct cs_dsp_client_ops

A client of cs_dsp does not necessarily need to implement any of the
optional callbacks in struct cs_dsp_client_ops, so allow the client_ops
pointer to be NULL.

This has been done by pointing client_ops at a default empty
cs_dsp_client_ops. It keeps the code cleaner by avoiding having to add
double nested NULL checks everywhere one of these callbacks is called.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251128102132.1575177-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c