All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Mark Gross <markgross@kernel.org>,
	Andy Shevchenko <andy@infradead.org>,
	Mark Pearson <markpearson@lenovo.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Len Baker <len.baker@gmx.com>,
	platform-driver-x86@vger.kernel.org
Subject: [PATCH 1/6] platform/x86: thinkpad_acpi: Restore missing hotkey_tablet_mode and hotkey_radio_sw sysfs-attr
Date: Tue, 23 Nov 2021 22:04:19 +0100	[thread overview]
Message-ID: <20211123210424.266607-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20211123210424.266607-1-hdegoede@redhat.com>

Commit c99ca78d67a6 ("platform/x86: thinkpad_acpi: Switch to common use
of attributes") removed the conditional adding of the
hotkey_tablet_mode and hotkey_radio_sw sysfs-attributes, replacing this
with a hotkey_attr_is_visible() callback which hides them when the
feature is not present.

But this commit forgot to add these 2 attributes to the default
hotkey_attributes[] set, so they would now never get added at all.

Add the 2 attributes to the default hotkey_attributes[] set so that
they are available on systems with these features once more.

Fixes: c99ca78d67a6 ("platform/x86: thinkpad_acpi: Switch to common use of attributes")
Cc: Len Baker <len.baker@gmx.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 2d2d5fd11635..ade3c1bdf80d 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2962,6 +2962,8 @@ static struct attribute *hotkey_attributes[] = {
 	&dev_attr_hotkey_all_mask.attr,
 	&dev_attr_hotkey_adaptive_all_mask.attr,
 	&dev_attr_hotkey_recommended_mask.attr,
+	&dev_attr_hotkey_tablet_mode.attr,
+	&dev_attr_hotkey_radio_sw.attr,
 #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
 	&dev_attr_hotkey_source_mask.attr,
 	&dev_attr_hotkey_poll_freq.attr,
-- 
2.33.1


  reply	other threads:[~2021-11-23 21:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 21:04 [PATCH 0/6] platform/x86: thinkpad_acpi: 4 bug-fixes + 2 cleanups Hans de Goede
2021-11-23 21:04 ` Hans de Goede [this message]
2021-11-23 21:04 ` [PATCH 2/6] platform/x86: thinkpad_acpi: Register tpacpi_pdriver after subdriver init Hans de Goede
2021-11-23 21:04 ` [PATCH 3/6] platform/x86: thinkpad_acpi: tpacpi_attr_group contains driver attributes not device attrs Hans de Goede
2021-11-23 21:04 ` [PATCH 4/6] platform/x86: thinkpad_acpi: Fix the hwmon sysfs-attr showing up in the wrong place Hans de Goede
2021-11-23 21:04 ` [PATCH 5/6] platform/x86: thinkpad_acpi: Remove unused sensors_pdev_attrs_registered flag Hans de Goede
2021-11-23 21:04 ` [PATCH 6/6] platform/x86: thinkpad_acpi: Move input_unregister_device() to the top of thinkpad_acpi_module_exit() Hans de Goede
2021-11-25 15:35 ` [PATCH 0/6] platform/x86: thinkpad_acpi: 4 bug-fixes + 2 cleanups 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=20211123210424.266607-2-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy@infradead.org \
    --cc=len.baker@gmx.com \
    --cc=markgross@kernel.org \
    --cc=markpearson@lenovo.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.