diff options
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r-- | drivers/iio/pressure/bmp280-core.c | 6 | ||||
-rw-r--r-- | drivers/iio/pressure/cros_ec_baro.c | 11 |
2 files changed, 7 insertions, 10 deletions
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index fe87d27779d9..3329d740c86c 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -164,6 +164,9 @@ static int bmp280_read_calib(struct bmp280_data *data, return ret; } + /* Toss the temperature calibration data into the entropy pool */ + add_device_randomness(t_buf, sizeof(t_buf)); + calib->T1 = le16_to_cpu(t_buf[T1]); calib->T2 = le16_to_cpu(t_buf[T2]); calib->T3 = le16_to_cpu(t_buf[T3]); @@ -177,6 +180,9 @@ static int bmp280_read_calib(struct bmp280_data *data, return ret; } + /* Toss the pressure calibration data into the entropy pool */ + add_device_randomness(p_buf, sizeof(p_buf)); + calib->P1 = le16_to_cpu(p_buf[P1]); calib->P2 = le16_to_cpu(p_buf[P2]); calib->P3 = le16_to_cpu(p_buf[P3]); diff --git a/drivers/iio/pressure/cros_ec_baro.c b/drivers/iio/pressure/cros_ec_baro.c index 87c07af9181f..034ce98d6e97 100644 --- a/drivers/iio/pressure/cros_ec_baro.c +++ b/drivers/iio/pressure/cros_ec_baro.c @@ -1,19 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * cros_ec_baro - Driver for barometer sensor behind CrosEC. * * Copyright (C) 2017 Google, Inc - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. */ -#include <linux/delay.h> #include <linux/device.h> #include <linux/iio/buffer.h> #include <linux/iio/common/cros_ec_sensors_core.h> |