summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/dmi-id.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/dmi-id.c')
-rw-r--r--drivers/firmware/dmi-id.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index 5f3a3e913d..d19c78a78a 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -169,9 +169,14 @@ static int dmi_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
return 0;
}
+static void dmi_dev_release(struct device *dev)
+{
+ kfree(dev);
+}
+
static struct class dmi_class = {
.name = "dmi",
- .dev_release = (void(*)(struct device *)) kfree,
+ .dev_release = dmi_dev_release,
.dev_uevent = dmi_dev_uevent,
};