aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorJaehee Park <jhpark1013@gmail.com>2022-04-13 00:38:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-13 08:49:48 +0200
commitcfb121803d42c51745b386f1747ba2f13215fa92 (patch)
tree425f058aee417ad23a6176229a1fc938e5f7c323 /drivers/staging/greybus
parentstaging: greybus: correct typo in comment (diff)
downloadlinux-dev-cfb121803d42c51745b386f1747ba2f13215fa92.tar.xz
linux-dev-cfb121803d42c51745b386f1747ba2f13215fa92.zip
staging: greybus: remove empty callback function
Remove the optional remove callback for the soc_codec_dev_gbaudio structure. The only place it is referenced is snd_soc_component_remove() which is only called if the sound_component pointer is non-null. The null function pointers here can be optionally ommitted. When a sound component is registered this way, the remove callback is optional. We can safely remove the whole gbcodec_remove function, which used to be an empty function with a void return type. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/12037ae2502ad7d0311bcdf2178c3d2156293236.1649824370.git.jhpark1013@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/audio_codec.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 0f50d1e51e2c..dc030caa64ba 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -1029,12 +1029,6 @@ static int gbcodec_probe(struct snd_soc_component *comp)
return 0;
}
-static void gbcodec_remove(struct snd_soc_component *comp)
-{
- /* Empty function for now */
- return;
-}
-
static int gbcodec_write(struct snd_soc_component *comp, unsigned int reg,
unsigned int value)
{
@@ -1049,8 +1043,6 @@ static unsigned int gbcodec_read(struct snd_soc_component *comp,
static const struct snd_soc_component_driver soc_codec_dev_gbaudio = {
.probe = gbcodec_probe,
- .remove = gbcodec_remove,
-
.read = gbcodec_read,
.write = gbcodec_write,
};