]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: sirf/atlas7: stop poking around in GPIO internals
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 12 Feb 2016 08:22:11 +0000 (09:22 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 15 Feb 2016 23:19:54 +0000 (00:19 +0100)
commit410acfc16ce033a4a4ecd6f51be9a0cb0e54c2d6
tree8e86749506bdcea2a07243f7e4efaaf462ce865e
parent129a35a002e69563e40a131ae3d65e03ae2637f8
pinctrl: sirf/atlas7: stop poking around in GPIO internals

This code is poking around in the gpio_chip:s internal structures
to achieve some kind of pin to GPIO mappings.

- It is wrong to poke around in these structs and the pinctrl
  maintainer was stupid to let it pass unnoticed, mea culpa.

- The right interface to use is gpiochip_add_pin_range()

- The code appears unused: the pin control part of the driver
  is not adding any ranges, so we're iterating over an empty
  list. Maybe it is poking around in some other pin controllers
  GPIO ranges, and that's just totally wrong, again use
  gpiochip_add_pin_range() and specify the right pin
  controller.

Cc: Barry Song <baohua@kernel.org>
Cc: Guoying Zhang <Guoying.Zhang@csr.com>
Cc: Wei Chen <Wei.Chen@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sirf/pinctrl-atlas7.c