Merge tag 'staging-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[linux-2.6-block.git] / drivers / iio / humidity / dht11.c
index f5128d8f777a71bad344b02db68b9cd77c795332..b459600e1a337e70c5ad88e7c07fc7457d5f1ac6 100644 (file)
@@ -148,7 +148,7 @@ static int dht11_decode(struct dht11 *dht11, int offset)
                return -EIO;
        }
 
-       dht11->timestamp = ktime_get_boot_ns();
+       dht11->timestamp = ktime_get_boottime_ns();
        if (hum_int < 4) {  /* DHT22: 100000 = (3*256+232)*100 */
                dht11->temperature = (((temp_int & 0x7f) << 8) + temp_dec) *
                                        ((temp_int & 0x80) ? -100 : 100);
@@ -176,7 +176,7 @@ static irqreturn_t dht11_handle_irq(int irq, void *data)
 
        /* TODO: Consider making the handler safe for IRQ sharing */
        if (dht11->num_edges < DHT11_EDGES_PER_READ && dht11->num_edges >= 0) {
-               dht11->edges[dht11->num_edges].ts = ktime_get_boot_ns();
+               dht11->edges[dht11->num_edges].ts = ktime_get_boottime_ns();
                dht11->edges[dht11->num_edges++].value =
                                                gpiod_get_value(dht11->gpiod);
 
@@ -195,7 +195,7 @@ static int dht11_read_raw(struct iio_dev *iio_dev,
        int ret, timeres, offset;
 
        mutex_lock(&dht11->lock);
-       if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_boot_ns()) {
+       if (dht11->timestamp + DHT11_DATA_VALID_TIME < ktime_get_boottime_ns()) {
                timeres = ktime_get_resolution_ns();
                dev_dbg(dht11->dev, "current timeresolution: %dns\n", timeres);
                if (timeres > DHT11_MIN_TIMERES) {
@@ -314,7 +314,7 @@ static int dht11_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       dht11->timestamp = ktime_get_boot_ns() - DHT11_DATA_VALID_TIME - 1;
+       dht11->timestamp = ktime_get_boottime_ns() - DHT11_DATA_VALID_TIME - 1;
        dht11->num_edges = -1;
 
        platform_set_drvdata(pdev, iio);