diff options
author | Jiri Kosina <jkosina@suse.cz> | 2023-04-26 23:52:34 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-04-26 23:52:34 +0300 |
commit | cdc780f044a803aff8845b949f800f0f3d095d5f (patch) | |
tree | 6695a80568f6b4aef414070f17859f434e229957 /drivers/platform/x86/wmi.c | |
parent | 38518593ec55e897abda4b4be77b2ec8ec4447d1 (diff) | |
parent | 37386669887d3f2ccf021322c5558353d20f2387 (diff) | |
download | linux-cdc780f044a803aff8845b949f800f0f3d095d5f.tar.xz |
Merge branch 'for-6.4/amd-sfh' into for-linus
- assorted functional fixes for amd-sfh driver (Basavaraj Natikar)
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r-- | drivers/platform/x86/wmi.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 5ffc00480aef..4fe7650dd014 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -693,15 +693,8 @@ char *wmi_get_acpi_device_uid(const char *guid_string) } EXPORT_SYMBOL_GPL(wmi_get_acpi_device_uid); -static struct wmi_block *dev_to_wblock(struct device *dev) -{ - return container_of(dev, struct wmi_block, dev.dev); -} - -static struct wmi_device *dev_to_wdev(struct device *dev) -{ - return container_of(dev, struct wmi_device, dev); -} +#define dev_to_wblock(__dev) container_of_const(__dev, struct wmi_block, dev.dev) +#define dev_to_wdev(__dev) container_of_const(__dev, struct wmi_device, dev) static inline struct wmi_driver *drv_to_wdrv(struct device_driver *drv) { @@ -804,9 +797,9 @@ static struct attribute *wmi_method_attrs[] = { }; ATTRIBUTE_GROUPS(wmi_method); -static int wmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env) +static int wmi_dev_uevent(const struct device *dev, struct kobj_uevent_env *env) { - struct wmi_block *wblock = dev_to_wblock(dev); + const struct wmi_block *wblock = dev_to_wblock(dev); if (add_uevent_var(env, "MODALIAS=wmi:%pUL", &wblock->gblock.guid)) return -ENOMEM; |