summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-03-14 00:07:52 +0000
committerHans de Goede <hdegoede@redhat.com>2023-03-16 15:42:17 +0100
commitdaaa2a1f78347d73016b3a331fd48a0ca9e62192 (patch)
tree65f1992ee60ca13ce38d10a80cf1a19487e5c6d6 /drivers
parentda62908efe80f132f691efc2ace4ca67626de86b (diff)
downloadlinux-stable-daaa2a1f78347d73016b3a331fd48a0ca9e62192.tar.gz
linux-stable-daaa2a1f78347d73016b3a331fd48a0ca9e62192.tar.bz2
linux-stable-daaa2a1f78347d73016b3a331fd48a0ca9e62192.zip
platform/x86: think-lmi: Remove custom kobject sysfs_ops
think-lmi defines its own sysfs_ops that are identical to the standard kobj_sysfs_ops. Use the standard definitions. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230314-think-lmi-sysfs_ops-v1-1-9d4f1cf9caec@weissschuh.net Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/think-lmi.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c
index c924e9e4a6a5..cc66f7cbccf2 100644
--- a/drivers/platform/x86/think-lmi.c
+++ b/drivers/platform/x86/think-lmi.c
@@ -1047,33 +1047,6 @@ static const struct attribute_group tlmi_attr_group = {
.attrs = tlmi_attrs,
};
-static ssize_t tlmi_attr_show(struct kobject *kobj, struct attribute *attr,
- char *buf)
-{
- struct kobj_attribute *kattr;
-
- kattr = container_of(attr, struct kobj_attribute, attr);
- if (kattr->show)
- return kattr->show(kobj, kattr, buf);
- return -EIO;
-}
-
-static ssize_t tlmi_attr_store(struct kobject *kobj, struct attribute *attr,
- const char *buf, size_t count)
-{
- struct kobj_attribute *kattr;
-
- kattr = container_of(attr, struct kobj_attribute, attr);
- if (kattr->store)
- return kattr->store(kobj, kattr, buf, count);
- return -EIO;
-}
-
-static const struct sysfs_ops tlmi_kobj_sysfs_ops = {
- .show = tlmi_attr_show,
- .store = tlmi_attr_store,
-};
-
static void tlmi_attr_setting_release(struct kobject *kobj)
{
struct tlmi_attr_setting *setting = to_tlmi_attr_setting(kobj);
@@ -1091,12 +1064,12 @@ static void tlmi_pwd_setting_release(struct kobject *kobj)
static const struct kobj_type tlmi_attr_setting_ktype = {
.release = &tlmi_attr_setting_release,
- .sysfs_ops = &tlmi_kobj_sysfs_ops,
+ .sysfs_ops = &kobj_sysfs_ops,
};
static const struct kobj_type tlmi_pwd_setting_ktype = {
.release = &tlmi_pwd_setting_release,
- .sysfs_ops = &tlmi_kobj_sysfs_ops,
+ .sysfs_ops = &kobj_sysfs_ops,
};
static ssize_t pending_reboot_show(struct kobject *kobj, struct kobj_attribute *attr,