On Wed, Dec 8, 2021 at 6:15 PM Gabriel Somlo <gsomlo@xxxxxxxxx> wrote: > > LiteX (https://github.com/enjoy-digital/litex) is a SoC framework > that targets FPGAs. LiteSDCard is a small footprint, configurable > SDCard core commonly used in LiteX designs. ... > + int ret; > + > + host->irq = platform_get_irq_optional(host->dev, 0); > + if (host->irq <= 0) { > + dev_warn(dev, "Failed to get IRQ, using polling\n"); > + goto use_polling; > + } This is wrong. It missed the deferred probe, for example. The best approach is ret = platform_get_irq_optional(...); if (ret < 0 && ret != -ENXIO) return ret; if (ret > 0) ...we got it... It will allow the future API fix of platform_get_irq_optional() to be really optional. -- With Best Regards, Andy Shevchenko