diff options
Diffstat (limited to 'drivers/rtc/rtc-x1205.c')
| -rw-r--r-- | drivers/rtc/rtc-x1205.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c index b1de58e0b3d0..5638b7ba8b06 100644 --- a/drivers/rtc/rtc-x1205.c +++ b/drivers/rtc/rtc-x1205.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/rtc.h> | 22 | #include <linux/rtc.h> |
| 23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
| 24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 25 | #include <linux/bitops.h> | ||
| 25 | 26 | ||
| 26 | #define DRV_VERSION "1.0.8" | 27 | #define DRV_VERSION "1.0.8" |
| 27 | 28 | ||
| @@ -366,8 +367,7 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim) | |||
| 366 | * perform sign extension. The formula is | 367 | * perform sign extension. The formula is |
| 367 | * Catr = (atr * 0.25pF) + 11.00pF. | 368 | * Catr = (atr * 0.25pF) + 11.00pF. |
| 368 | */ | 369 | */ |
| 369 | if (atr & 0x20) | 370 | atr = sign_extend32(atr, 5); |
| 370 | atr |= 0xC0; | ||
| 371 | 371 | ||
| 372 | dev_dbg(&client->dev, "%s: raw atr=%x (%d)\n", __func__, atr, atr); | 372 | dev_dbg(&client->dev, "%s: raw atr=%x (%d)\n", __func__, atr, atr); |
| 373 | 373 | ||
