Hi Richard, On Thu, Jun 7, 2018 at 1:17 PM, Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx> wrote: > I see the bug. If the hog node isn't a 1st level child of the pinctrl > parent node it will go around the for(;;) loop again but on the first > pass I overwrite pctldev with the result of > get_pinctrl_dev_from_of_node() so it doesn't point to the pinctrl driver > any more. > > It's end of the day here, I'll do a patch tomorrow to stash the original > pctldev so it doesn't get overwritten. > > Something like this should work. > > 1) Rename the "pctldev" argument to the function to "hog_pctldev" > 2) Add a local variable > struct pinctrl_dev *pctldev = NULL; > > 3) Change the if statement to: > > if (hog_pctldev && (np_pctldev == p->dev->of_node)) { > pctrldev = hog_pctldev; > break; > } > Yes, this works fine. Thanks. Will send your suggested fix. Thanks for your help! -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html