[PATCH 09/13] drm/i2c: tda998x: clean up tda998x_configure_audio()

Sven Van Asbroeck thesven73 at gmail.com
Wed Jun 12 15:37:32 UTC 2019


On Tue, Jun 11, 2019 at 7:02 AM Russell King <rmk+kernel at armlinux.org.uk> wrote:
>
> tda998x_configure_audio() is called via some paths where an error
> return is meaningless, and as a result of moving the audio routing
> code, this function no longer returns any errors, so let's make it
> void. We can also make tda998x_write_aif() return void as well.
>
> tda998x_configure_audio() also only ever needs to write the current
> audio settings, so simplify the code in tda998x_audio_hw_params()
> so that can happen.
>
> Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
> ---

Nit:

+static void tda998x_configure_audio(struct tda998x_priv *priv)
 {
+       struct tda998x_audio_settings *settings = &priv->audio;

settings could be const ?

-static int tda998x_write_aif(struct tda998x_priv *priv,
-                            struct hdmi_audio_infoframe *cea)
+static void tda998x_write_aif(struct tda998x_priv *priv,
+                             struct hdmi_audio_infoframe *cea)

cea could be const ?


More information about the dri-devel mailing list