]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: dln2: Fix sanity checking for endpoints
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 26 Feb 2020 14:51:58 +0000 (16:51 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 30 Mar 2020 06:35:28 +0000 (07:35 +0100)
commitcf9e01ce2ae851657bf22f3b778e54fe3469a680
tree287bc1fb903fe46175e1c633b0f38d125d67947e
parent13684aaea63eb20f262e62904bde1f983313d63a
mfd: dln2: Fix sanity checking for endpoints

While the commit dc1d902fe38e ("mfd: dln2: More sanity checking for endpoints")
tries to harden the sanity checks it made at the same time a regression,
i.e.  mixed in and out endpoints. Obviously it should have been not tested on
real hardware at that time, but unluckily it didn't happen.

So, fix above mentioned typo and make device being enumerated again.

While here, introduce an enumerator for magic values to prevent similar issue
to happen in the future.

Fixes: dc1d902fe38e ("mfd: dln2: More sanity checking for endpoints")
Cc: Oliver Neukum <oneukum@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/dln2.c