Re: [PATCH] gpiolib: devres: shrink devm_gpiochip_add_data_with_key()

2020-11-12 Thread Bartosz Golaszewski
On Wed, Nov 11, 2020 at 4:04 PM Andy Shevchenko wrote: > > On Wed, Nov 11, 2020 at 5:02 PM Andy Shevchenko > wrote: > > > > On Tue, Nov 10, 2020 at 11:42 AM Bartosz Golaszewski wrote: > > > > > > From: Bartosz Golaszewski > > > > > > If all we want to manage is a single pointer, there's no need

Re: [PATCH] gpiolib: devres: shrink devm_gpiochip_add_data_with_key()

2020-11-11 Thread Andy Shevchenko
On Wed, Nov 11, 2020 at 5:02 PM Andy Shevchenko wrote: > > On Tue, Nov 10, 2020 at 11:42 AM Bartosz Golaszewski wrote: > > > > From: Bartosz Golaszewski > > > > If all we want to manage is a single pointer, there's no need to > > manually allocate and add a new devres. We can simply use > > devm

Re: [PATCH] gpiolib: devres: shrink devm_gpiochip_add_data_with_key()

2020-11-11 Thread Andy Shevchenko
On Tue, Nov 10, 2020 at 11:42 AM Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > If all we want to manage is a single pointer, there's no need to > manually allocate and add a new devres. We can simply use > devm_add_action_or_reset() and shrink the code by a good bit. Yes, it is po

Re: [PATCH] gpiolib: devres: shrink devm_gpiochip_add_data_with_key()

2020-11-11 Thread Linus Walleij
On Tue, Nov 10, 2020 at 10:39 AM Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > If all we want to manage is a single pointer, there's no need to > manually allocate and add a new devres. We can simply use > devm_add_action_or_reset() and shrink the code by a good bit. > > Signed-off-