mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
pinctrl: changes hog mechanism to be self-referential
Instead of a specific boolean field to indicate if a map entry shall be hogged, treat self-reference as an indication of desired hogging. This drops one field off the map struct and has a nice Douglas R. Hofstadter-feel to it. Acked-by: Dong Aisheng <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
befe5bdfbb
commit
77a5988355
3 changed files with 12 additions and 20 deletions
|
|
@ -793,11 +793,9 @@ int pinctrl_hog_maps(struct pinctrl_dev *pctldev)
|
|||
for (i = 0; i < pinctrl_maps_num; i++) {
|
||||
struct pinctrl_map const *map = &pinctrl_maps[i];
|
||||
|
||||
if (!map->hog_on_boot)
|
||||
continue;
|
||||
|
||||
if (map->ctrl_dev_name &&
|
||||
!strcmp(map->ctrl_dev_name, devname)) {
|
||||
!strcmp(map->ctrl_dev_name, devname) &&
|
||||
!strcmp(map->dev_name, devname)) {
|
||||
/* OK time to hog! */
|
||||
ret = pinctrl_hog_map(pctldev, map);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue