From: Armin Wolf <W_Armin@gmx.de>
To: hdegoede@redhat.com, markgross@kernel.org
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] platform/x86: wmi-bmof: Use device_create_bin_file()
Date: Sun, 30 Jul 2023 06:38:15 +0200 [thread overview]
Message-ID: <20230730043817.12888-1-W_Armin@gmx.de> (raw)
Use device_create_bin_file() instead of sysfs_create_bin_file()
to avoid having to access the device kobject.
Tested on a ASUS PRIME B650-PLUS.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
drivers/platform/x86/wmi-bmof.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/wmi-bmof.c b/drivers/platform/x86/wmi-bmof.c
index 80137afb9753..d0516cacfcb5 100644
--- a/drivers/platform/x86/wmi-bmof.c
+++ b/drivers/platform/x86/wmi-bmof.c
@@ -75,7 +75,7 @@ static int wmi_bmof_probe(struct wmi_device *wdev, const void *context)
priv->bmof_bin_attr.read = read_bmof;
priv->bmof_bin_attr.size = priv->bmofdata->buffer.length;
- ret = sysfs_create_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr);
+ ret = device_create_bin_file(&wdev->dev, &priv->bmof_bin_attr);
if (ret)
goto err_free;
@@ -90,7 +90,7 @@ static void wmi_bmof_remove(struct wmi_device *wdev)
{
struct bmof_priv *priv = dev_get_drvdata(&wdev->dev);
- sysfs_remove_bin_file(&wdev->dev.kobj, &priv->bmof_bin_attr);
+ device_remove_bin_file(&wdev->dev, &priv->bmof_bin_attr);
kfree(priv->bmofdata);
}
--
2.39.2
next reply other threads:[~2023-07-30 4:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-30 4:38 Armin Wolf [this message]
2023-07-30 4:38 ` [PATCH 2/3] platform/x86: wmi-bmof: Simplify read_bmof() Armin Wolf
2023-07-30 7:10 ` Thomas Weißschuh
2023-07-30 7:35 ` Thomas Weißschuh
2023-07-30 4:38 ` [PATCH 3/3] platform/x86: wmi-bmof: Update MAINTAINERS entry Armin Wolf
2023-07-30 7:11 ` Thomas Weißschuh
2023-07-30 20:30 ` Armin Wolf
2023-07-30 7:10 ` [PATCH 1/3] platform/x86: wmi-bmof: Use device_create_bin_file() Thomas Weißschuh
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=20230730043817.12888-1-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®