summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/wmi-bmof.c
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2023-07-30 22:45:48 +0200
committerHans de Goede <hdegoede@redhat.com>2023-07-31 16:07:24 +0200
commitf4ae2e96ae929f1618f6e5e55f754f712354d7eb (patch)
tree3b09ee570d2218b76a07348d57f1a84ac4755391 /drivers/platform/x86/wmi-bmof.c
parentMerge tag 'ib-pdx86-simatic-v6.6-2' into review-hans (diff)
downloadlinux-f4ae2e96ae929f1618f6e5e55f754f712354d7eb.tar.xz
linux-f4ae2e96ae929f1618f6e5e55f754f712354d7eb.zip
platform/x86: wmi-bmof: Use device_create_bin_file()
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. Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20230730204550.3402-1-W_Armin@gmx.de Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/wmi-bmof.c')
-rw-r--r--drivers/platform/x86/wmi-bmof.c4
1 files 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);
}