lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hlg6bfi26.wl-tiwai@suse.de>
Date:   Fri, 02 Nov 2018 19:30:41 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     "Andy Shevchenko" <andy.shevchenko@...il.com>
Cc:     "Ayman Bagabas" <ayman.bagabas@...il.com>,
        "ALSA Development Mailing List" <alsa-devel@...a-project.org>,
        "Hui Wang" <hui.wang@...onical.com>,
        "Andy Shevchenko" <andy@...radead.org>,
        "Darren Hart" <dvhart@...radead.org>,
        "Jaroslav Kysela" <perex@...ex.cz>, <kailang@...ltek.com>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        "Platform Driver" <platform-driver-x86@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] ALSA: hda: add support for Huawei WMI MicMute LED

On Fri, 02 Nov 2018 19:12:44 +0100,
Andy Shevchenko wrote:
> 
> > +       if (action == HDA_FIXUP_ACT_PROBE) {
> > +               if (!huawei_wmi_micmute_led_set_func)
> > +                       huawei_wmi_micmute_led_set_func = symbol_request(huawei_wmi_micmute_led_set);
> > +               if (!huawei_wmi_micmute_led_set_func) {
> > +                       codec_warn(codec, "Failed to find huawei_wmi symbol huawei_wmi_micmute_led_set\n");
> > +                       return;
> > +               }
> > +               removefunc = (huawei_wmi_micmute_led_set_func(false) < 0)
> > +                       || (snd_hda_gen_add_micmute_led(codec, update_huawei_wmi_micmute_led) < 0);
> > +
> > +       }
> > +
> > +       if (huawei_wmi_micmute_led_set_func && (action == HDA_FIXUP_ACT_FREE || removefunc)) {
> > +               symbol_put(huawei_wmi_micmute_led_set);
> > +               huawei_wmi_micmute_led_set_func = NULL;
> > +       }
> > +}
> 
> Takashi, is it a way how the rest sound drivers are written? B/c this
> symbol_request(s) look to me a bit ugly.

It's a workaround for not having a hard dependency.  The HD-audio
codec driver is generic, and we don't want to load the multiple WMI
drivers always for using a Realtek codec.

Ugly, yes, but simple enough.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ