From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/drivers/hwmon/sht15.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'kernel/drivers/hwmon/sht15.c') diff --git a/kernel/drivers/hwmon/sht15.c b/kernel/drivers/hwmon/sht15.c index d4f0935da..a2fdbb7d2 100644 --- a/kernel/drivers/hwmon/sht15.c +++ b/kernel/drivers/hwmon/sht15.c @@ -33,6 +33,7 @@ #include #include #include +#include /* Commands */ #define SHT15_MEASURE_TEMP 0x03 @@ -172,19 +173,6 @@ struct sht15_data { atomic_t interrupt_handled; }; -/** - * sht15_reverse() - reverse a byte - * @byte: byte to reverse. - */ -static u8 sht15_reverse(u8 byte) -{ - u8 i, c; - - for (c = 0, i = 0; i < 8; i++) - c |= (!!(byte & (1 << i))) << (7 - i); - return c; -} - /** * sht15_crc8() - compute crc8 * @data: sht15 specific data. @@ -196,7 +184,7 @@ static u8 sht15_crc8(struct sht15_data *data, const u8 *value, int len) { - u8 crc = sht15_reverse(data->val_status & 0x0F); + u8 crc = bitrev8(data->val_status & 0x0F); while (len--) { crc = sht15_crc8_table[*value ^ crc]; @@ -477,7 +465,7 @@ static int sht15_update_status(struct sht15_data *data) if (data->checksumming) { sht15_ack(data); - dev_checksum = sht15_reverse(sht15_read_byte(data)); + dev_checksum = bitrev8(sht15_read_byte(data)); checksum_vals[0] = SHT15_READ_STATUS; checksum_vals[1] = status; data->checksum_ok = (sht15_crc8(data, checksum_vals, 2) @@ -864,7 +852,7 @@ static void sht15_bh_read_data(struct work_struct *work_s) */ if (sht15_ack(data)) goto wakeup; - dev_checksum = sht15_reverse(sht15_read_byte(data)); + dev_checksum = bitrev8(sht15_read_byte(data)); checksum_vals[0] = (data->state == SHT15_READING_TEMP) ? SHT15_MEASURE_TEMP : SHT15_MEASURE_RH; checksum_vals[1] = (u8) (val >> 8); @@ -1074,7 +1062,7 @@ static int sht15_remove(struct platform_device *pdev) return 0; } -static struct platform_device_id sht15_device_ids[] = { +static const struct platform_device_id sht15_device_ids[] = { { "sht10", sht10 }, { "sht11", sht11 }, { "sht15", sht15 }, -- cgit 1.2.3-korg