From: Thomas Petazzoni Date: Thu, 22 Nov 2012 17:19:09 +0000 (+0100) Subject: dma: mv_xor: use request_irq() instead of devm_request_irq() X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~12^2~1^2^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d0a074517da34a6386bdd9a22bc006c8fa21044;p=pandora-kernel.git dma: mv_xor: use request_irq() instead of devm_request_irq() Even through the usage of devm_*() functions is generally recommended over their classic variants, in the case of devm_request_irq() combined with irq_of_parse_and_map(), it doesn't work nicely. We have the following scenario: irq_of_parse_and_map(...) devm_request_irq(...) For some reason, the driver initialization fails at a later point. Since irq_of_parse_and_map() is no device-managed, we do a: irq_dispose_mapping(...) Unfortunately, this doesn't work, because the free_irq() must be done prior to calling irq_dispose_mapping(). But with the devm mechanism, the automatic free_irq() would happen only after we get out of the ->probe() function. So basically, we revert to using request_irq() with traditional error handling, so that in case of error, free_irq() gets called before irq_dispose_mapping(). Signed-off-by: Thomas Petazzoni --- Reading git-diff-tree failed