From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Perry Yuan <Perry.Yuan@dell.com>,
pobrn@protonmail.com, pierre-louis.bossart@linux.intel.com,
oder_chiou@realtek.com, perex@perex.cz, tiwai@suse.com,
hdegoede@redhat.com, mgross@linux.intel.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
lgirdwood@gmail.com, platform-driver-x86@vger.kernel.org,
broonie@kernel.org, Dell.Client.Kernel@dell.com,
mario.limonciello@outlook.com
Subject: Re: [PATCH v7 1/2] platform/x86: dell-privacy: Add support for Dell hardware privacy
Date: Mon, 12 Apr 2021 12:39:50 +0200 [thread overview]
Message-ID: <63b8dca1-83d0-09ab-3622-0baa68bbf776@linux.intel.com> (raw)
In-Reply-To: <20210412091919.27608-1-Perry_Yuan@Dell.com>
On 4/12/2021 11:19 AM, Perry Yuan wrote:
> From: Perry Yuan <perry_yuan@dell.com>
>
(...)
> diff --git a/drivers/platform/x86/dell/dell-laptop.c b/drivers/platform/x86/dell/dell-laptop.c
> index 70edc5bb3a14..e7ffc0b81208 100644
> --- a/drivers/platform/x86/dell/dell-laptop.c
> +++ b/drivers/platform/x86/dell/dell-laptop.c
> @@ -31,6 +31,8 @@
> #include "dell-rbtn.h"
> #include "dell-smbios.h"
>
> +#include "dell-privacy-wmi.h"
> +
> struct quirk_entry {
> bool touchpad_led;
> bool kbd_led_not_present;
> @@ -90,6 +92,7 @@ static struct rfkill *wifi_rfkill;
> static struct rfkill *bluetooth_rfkill;
> static struct rfkill *wwan_rfkill;
> static bool force_rfkill;
> +static bool has_privacy;
>
> module_param(force_rfkill, bool, 0444);
> MODULE_PARM_DESC(force_rfkill, "enable rfkill on non whitelisted models");
> @@ -2206,10 +2209,16 @@ static int __init dell_init(void)
>
> if (dell_smbios_find_token(GLOBAL_MIC_MUTE_DISABLE) &&
> dell_smbios_find_token(GLOBAL_MIC_MUTE_ENABLE)) {
> - micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> - ret = led_classdev_register(&platform_device->dev, &micmute_led_cdev);
> - if (ret < 0)
> - goto fail_led;
> + if (dell_privacy_present())
> + has_privacy = true;
> + else
> + has_privacy = false;
Bit, of nitpicking, but you can write above shorter:
has_privacy = dell_privacy_present();
next prev parent reply other threads:[~2021-04-12 10:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 9:19 [PATCH v7 1/2] platform/x86: dell-privacy: Add support for Dell hardware privacy Perry Yuan
2021-04-12 10:39 ` Amadeusz Sławiński [this message]
2021-04-13 6:35 ` Yuan, Perry
2021-04-13 8:48 ` Hans de Goede
2021-05-06 9:48 ` Yuan, Perry
2021-05-18 10:49 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63b8dca1-83d0-09ab-3622-0baa68bbf776@linux.intel.com \
--to=amadeuszx.slawinski@linux.intel.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=Perry.Yuan@dell.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@outlook.com \
--cc=mgross@linux.intel.com \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pobrn@protonmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox