--- zzzz-none-000/linux-3.10.107/drivers/hwmon/ibmaem.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/ibmaem.c 2021-02-04 17:41:59.000000000 +0000 @@ -3,7 +3,7 @@ * temperature/power/energy sensors and capping functionality. * Copyright (C) 2008 IBM * - * Author: Darrick J. Wong + * Author: Darrick J. Wong * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -292,7 +292,7 @@ dev_err(bmc, "Unable to register user with IPMI interface %d\n", data->interface); - return -EACCES; + return err; } return 0; @@ -842,11 +842,10 @@ struct aem_data *data = dev_get_drvdata(dev); u64 before, after, delta, time; signed long leftover; - struct timespec b, a; mutex_lock(&data->lock); update_aem_energy_one(data, attr->index); - getnstimeofday(&b); + time = ktime_get_ns(); before = data->energy[attr->index]; leftover = schedule_timeout_interruptible( @@ -858,11 +857,10 @@ } update_aem_energy_one(data, attr->index); - getnstimeofday(&a); + time = ktime_get_ns() - time; after = data->energy[attr->index]; mutex_unlock(&data->lock); - time = timespec_to_ns(&a) - timespec_to_ns(&b); delta = (after - before) * UJ_PER_MJ; return sprintf(buf, "%llu\n", @@ -1103,7 +1101,7 @@ aem_delete(p1); } -MODULE_AUTHOR("Darrick J. Wong "); +MODULE_AUTHOR("Darrick J. Wong "); MODULE_DESCRIPTION("IBM AEM power/temp/energy sensor driver"); MODULE_LICENSE("GPL");