Re: [PATCH v2] serial/8250_dw: use platform_get_irq() instead of platform_get_resource()

From: Alexey Brodkin
Date: Tue Mar 03 2015 - 10:34:06 EST


Hi Andy,

On Tue, 2015-03-03 at 17:26 +-0200, Andy Shevchenko wrote:
+AD4- On Tue, 2015-03-03 at 18:11 +-0300, Alexey Brodkin wrote:
+AD4- +AD4- It is not recommened to use platform+AF8-get+AF8-resource(pdev, IORESOURCE+AF8-IRQ)
+AD4- +AD4- for requesting IRQ's resources any more, as they can be not ready yet in
+AD4- +AD4- case of DT-booting.
+AD4- +AD4-
+AD4- +AD4- platform+AF8-get+AF8-irq() instead is a recommended way for getting IRQ even if
+AD4- +AD4- it was not retrieved earlier.
+AD4- +AD4-
+AD4- +AD4- It also makes code simpler because we're getting +ACI-int+ACI- value right away
+AD4- +AD4- and no conversion from resource to int is required.
+AD4- +AD4-
+AD4- +AD4- Changes in v2:
+AD4- +AD4- +ACo- Suppress error message if platform+AF8-get+AF8-irq() returns -EPROBE+AF8-DEFER
+AD4-
+AD4- Do we really need that message at all?

IMHO it makes sense.

For example it was useful for me when debugging stacked interrupt
controllers setup - I got explicitly notified why this particular device
failed on probe.

Note that IRQ is a pretty specific resource due to the fact of INTC
stacking and situations when each and every INTC gets finally probed.

Still if you believe we may drop this message with no loss of usability
- I'm fine with that as well.

-Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/