[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR19MB452892DD4BA9669B2BB2519C844F9@SJ0PR19MB4528.namprd19.prod.outlook.com>
Date: Tue, 13 Apr 2021 06:35:23 +0000
From: "Yuan, Perry" <Perry.Yuan@...l.com>
To: Amadeusz Slawinski <amadeuszx.slawinski@...ux.intel.com>,
"pobrn@...tonmail.com" <pobrn@...tonmail.com>,
"pierre-louis.bossart@...ux.intel.com"
<pierre-louis.bossart@...ux.intel.com>,
"oder_chiou@...ltek.com" <oder_chiou@...ltek.com>,
"perex@...ex.cz" <perex@...ex.cz>,
"tiwai@...e.com" <tiwai@...e.com>,
"hdegoede@...hat.com" <hdegoede@...hat.com>,
"mgross@...ux.intel.com" <mgross@...ux.intel.com>
CC: "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>,
"broonie@...nel.org" <broonie@...nel.org>,
Dell Client Kernel <Dell.Client.Kernel@...l.com>,
"mario.limonciello@...look.com" <mario.limonciello@...look.com>
Subject: RE: [PATCH v7 1/2] platform/x86: dell-privacy: Add support for Dell
hardware privacy
Hi ,
> -----Original Message-----
> From: Amadeusz Sławiński <amadeuszx.slawinski@...ux.intel.com>
> Sent: 2021年4月12日 18:40
> To: Yuan, Perry; pobrn@...tonmail.com; pierre-
> louis.bossart@...ux.intel.com; oder_chiou@...ltek.com; perex@...ex.cz;
> tiwai@...e.com; hdegoede@...hat.com; mgross@...ux.intel.com
> Cc: alsa-devel@...a-project.org; linux-kernel@...r.kernel.org;
> lgirdwood@...il.com; platform-driver-x86@...r.kernel.org;
> broonie@...nel.org; Dell Client Kernel; mario.limonciello@...look.com
> Subject: Re: [PATCH v7 1/2] platform/x86: dell-privacy: Add support for Dell
> hardware privacy
>
>
> [EXTERNAL EMAIL]
>
> On 4/12/2021 11:19 AM, Perry Yuan wrote:
> > From: Perry Yuan <perry_yuan@...l.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();
Good point, changed the code as you suggested.
Thank you.
Perry.
Powered by blists - more mailing lists