diff options
| author | Borislav Petkov <bp@suse.de> | 2016-11-23 23:13:40 +0300 |
|---|---|---|
| committer | Borislav Petkov <bp@suse.de> | 2016-11-23 23:13:40 +0300 |
| commit | 627bc29ed90ca50dbf7a4e7b43c267a2920bbadb (patch) | |
| tree | 838d8aca5a04166b6ad74a2ef0f5291224768501 /include/linux/regmap.h | |
| parent | 044e7a414be9ba20826e5fd482214686193fe7b6 (diff) | |
| parent | 3f5a7896a5096fd50030a04d4c3f28a7441e30a5 (diff) | |
| download | linux-627bc29ed90ca50dbf7a4e7b43c267a2920bbadb.tar.xz | |
Merge tip:ras/core to pick up dependent changes
tip:ras/core contains the respective Fam17h x86 RAS bits which
amd64_edac is going to use. So merge it into the EDAC branch.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'include/linux/regmap.h')
| -rw-r--r-- | include/linux/regmap.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 9adc7b21903d..f6673132431d 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -15,6 +15,7 @@ #include <linux/list.h> #include <linux/rbtree.h> +#include <linux/delay.h> #include <linux/err.h> #include <linux/bug.h> #include <linux/lockdep.h> @@ -116,22 +117,22 @@ struct reg_sequence { #define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \ ({ \ ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ - int ret; \ + int pollret; \ might_sleep_if(sleep_us); \ for (;;) { \ - ret = regmap_read((map), (addr), &(val)); \ - if (ret) \ + pollret = regmap_read((map), (addr), &(val)); \ + if (pollret) \ break; \ if (cond) \ break; \ if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \ - ret = regmap_read((map), (addr), &(val)); \ + pollret = regmap_read((map), (addr), &(val)); \ break; \ } \ if (sleep_us) \ usleep_range((sleep_us >> 2) + 1, sleep_us); \ } \ - ret ?: ((cond) ? 0 : -ETIMEDOUT); \ + pollret ?: ((cond) ? 0 : -ETIMEDOUT); \ }) #ifdef CONFIG_REGMAP |
