OSDN Git Service

platform/x86/intel-uncore-freq: Add release callback
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 18 Feb 2020 02:28:44 +0000 (18:28 -0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 28 Feb 2020 10:44:11 +0000 (12:44 +0200)
commitee633afded0ddaaa44c70f7f87ae1345e8b8e27b
treeb34ff7a3d36a2ae87b03e1d8ebf859b046b8fb1b
parent64b73cff66acee7c1ec063676e0771534578c164
platform/x86/intel-uncore-freq: Add release callback

On module unload wait for relese callback for each packag_die entry
and then free the memory. This is done by waiting on a completion
object, till release() callback.

While here, also change to kobject_init_and_add() to
kobject_create_and_add() to simplify.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel-uncore-frequency.c