[PATCH v2 1/2] pinctrl: bcm: bcm2835: Switch to use ->add_pin_ranges()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Sat Jan 14 05:02:18 PST 2023


On Sat, Jan 14, 2023 at 12:23:49PM +0100, Stefan Wahren wrote:
> Am 13.01.23 um 22:31 schrieb Andy Shevchenko:
> > On Fri, Jan 13, 2023 at 09:13:23PM +0100, Stefan Wahren wrote:
> > > Am 13.01.23 um 18:10 schrieb Andy Shevchenko:

...

> > > > Also I would like to understand the dance around checking for pin
> > > > control device. The original commit lacks of comments in the non-trivial
> > > > code.
> > Any comment on this?
> Do you mean the NULL check? of_pinctrl_get() could return NULL, but
> pinctrl_dev_get_devname() directly access the dev member.

The of_pinctrl_get() call. Why do we need that? AFAIU the code is called
after we call devm_pinctrl_register() and hence it can not be NULL. Am I
mistaken?

P.S. This is out of the scope of the series anyway, I left that untouched.
So it is just for me to understand better the code flow.

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list