cpuquiet: Fix locking in driver_unregister
[firefly-linux-kernel-4.4.55.git] / drivers / cpuquiet / cpuquiet.c
1 /*
2  * Copyright (c) 2012 NVIDIA CORPORATION.  All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
11  * more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16  *
17  */
18
19 #include <linux/kernel.h>
20 #include <linux/cpu.h>
21 #include <linux/slab.h>
22 #include <linux/cpuquiet.h>
23 #include "cpuquiet.h"
24
25 DEFINE_MUTEX(cpuquiet_lock);
26
27 static int __init cpuquiet_init(void)
28 {
29         return cpuquiet_add_interface(cpu_subsys.dev_root);
30 }
31
32 core_initcall(cpuquiet_init);