Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpio: xilinx: Switch to use bitmap APIs
It seems that Xilinx GPIO driver operates with bit arrays longer than 32 and thus can leverage bitmap APIs for that. It makes code better to understand. The ->probe() function is modified to try read properties for both channels since is_dual check makes only sense for the amount of pins used for the second channel. On top of that kzalloc() guarantees zero initial values for the fields in the private data structure, hence drop unneeded conditionals and assignments. The change is inspired by Syed Nayyar Waris' ideas about bitmap API extension. Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Neeli Srinivas <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
- Loading branch information