lkml.org 
[lkml]   [2019]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] regmap: regmap-irq: fix getting type default values
Date
On Thu, 2019-03-28 at 16:22 +0000, Srinivas Kandagatla wrote:
> Checking for value of type default value just after allocating will
> always be zero and the type register default values will never be
> read,
> so fix this!
>
> Without this patch setting irq type will be silently ignored.
> Patch "regmap: regmap-irq: Remove default irq type setting from core"
> did remove the default mask but it forgot to remove the check before
> reading the default type register.
>
> Fixes: 84267d1b18ab ("regmap: regmap-irq: Remove default irq type
> setting from core")
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

> ---
> drivers/base/regmap/regmap-irq.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/base/regmap/regmap-irq.c
> b/drivers/base/regmap/regmap-irq.c
> index 5059748afd4c..02eb75646141 100644
> --- a/drivers/base/regmap/regmap-irq.c
> +++ b/drivers/base/regmap/regmap-irq.c
> @@ -761,9 +761,6 @@ int regmap_add_irq_chip(struct regmap *map, int
> irq, int irq_flags,
>
> if (chip->num_type_reg && !chip->type_in_mask) {
> for (i = 0; i < chip->num_type_reg; ++i) {
> - if (!d->type_buf_def[i])
> - continue;
> -
> reg = chip->type_base +
> (i * map->reg_stride * d-
> >type_reg_stride);
>
It looks like I left a bug there. Thanks for the fix!

Br,
Matti


\
 
 \ /
  Last update: 2019-04-01 12:02    [W:0.034 / U:2.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site