From 0b43e41e93815ecd9616759cf5d64d3a7be8e6fb Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Thu, 15 Aug 2019 21:41:40 -0400 Subject: [PATCH] platform/x86: intel_pmc_core_pltdrv: Module removal warning fix Prior to this commit, removing the intel_pmc_core_pltdrv module would cause the following warning: Device 'intel_pmc_core.0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0 PID: 2202 at drivers/base/core.c:1238 device_release+0x6f/0x80 This commit hence adds an empty release function for the driver. Signed-off-by: M. Vefa Bicakci Signed-off-by: Andy Shevchenko --- drivers/platform/x86/intel_pmc_core_pltdrv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/platform/x86/intel_pmc_core_pltdrv.c b/drivers/platform/x86/intel_pmc_core_pltdrv.c index a8754a6..1865400 100644 --- a/drivers/platform/x86/intel_pmc_core_pltdrv.c +++ b/drivers/platform/x86/intel_pmc_core_pltdrv.c @@ -18,8 +18,16 @@ #include #include +static void intel_pmc_core_release(struct device *dev) +{ + /* Nothing to do. */ +} + static struct platform_device pmc_core_device = { .name = "intel_pmc_core", + .dev = { + .release = intel_pmc_core_release, + }, }; /* -- 2.7.4