]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/hwmon/fam15h_power.c
hwmon: Replace deprecated CPU-hotplug functions.
[mirror_ubuntu-jammy-kernel.git] / drivers / hwmon / fam15h_power.c
index 29f5fed28c2a78c55d1bcd456ecf561f4fe94882..521534d5c1e5f786668a33b9deb28718d76d99b0 100644 (file)
@@ -166,7 +166,7 @@ static int read_registers(struct fam15h_power_data *data)
 
        memset(data->cu_on, 0, sizeof(int) * MAX_CUS);
 
-       get_online_cpus();
+       cpus_read_lock();
 
        /*
         * Choose the first online core of each compute unit, and then
@@ -190,7 +190,7 @@ static int read_registers(struct fam15h_power_data *data)
 
        on_each_cpu_mask(mask, do_read_registers_on_cu, data, true);
 
-       put_online_cpus();
+       cpus_read_unlock();
        free_cpumask_var(mask);
 
        return 0;