atomisp/css: optimize sh_css_hrt_irq_get_id()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 21 Oct 2011 14:31:38 +0000 (17:31 +0300)
committerbuildbot <buildbot@intel.com>
Thu, 16 Feb 2012 16:17:52 +0000 (08:17 -0800)
commit4c5ca0aece4713798077c987d73189ebb958002b
treedb70d870c5aeab988f606f1d7ccd254bcb4f942d
parent18661bd67a55aab0a7c1fac1be4fee94fa11f311
atomisp/css: optimize sh_css_hrt_irq_get_id()

BZ: 23514

There is no need to loop to find the first set bit. We can easily use the ffs()
function to do the job. And this way is faster.

This patch implements faster and simplier codepiece.

Change-Id: Id9d26a0cbf3c9a965e0c82fbd47d47734730df29
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-on: http://android.intel.com:8080/34932
Reviewed-by: Shevchenko, Andriy <andriy.shevchenko@intel.com>
Reviewed-by: Kruger, Jozef <jozef.kruger@intel.com>
Reviewed-by: Wang, Wen W <wen.w.wang@intel.com>
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/media/video/atomisp/css/sh_css_hrt.c