On Tue, Oct 28, 2025 at 12:34 PM Andy Shevchenko andriy.shevchenko@intel.com wrote:
On Mon, Oct 27, 2025 at 06:24:25PM +0100, Linus Walleij wrote:
On Mon, Oct 27, 2025 at 12:55 PM Andy Shevchenko andriy.shevchenko@intel.com wrote:
On Mon, Oct 27, 2025 at 11:18:17AM +0100, Linus Walleij wrote:
Hmm... Isn't this already being discussed somewhere? I have some déjà-vu.
I brought it up on the PostmarkeOS IRC, otherwise I don't know.
It might be that it was a cross-mail that describes the same issue in another IIO driver.
Hm, I'm a bit worried that this may be a generic problem in several drivers that now think they can be used without IRQ but actually crash if you try to do that :/
Wouldn't check for 0 be enough?
if (!data->irq)But this driver does not store the IRQ number in the instance struct because it isn't used outside of the probe() function.
The information that needs to be stored is bool so that's why I stored a bool.
I understand this, but I think storing the IRQ number is tiny better as we might have a chance to need it in the future.
Fair enough, it's a common pattern so I'll rewrite the patch like this!
Yours, Linus Walleij