Skip to content

Commit 287666d

Browse files
daeseokyoungregkh
authored andcommitted
staging: atomisp: remove enable_isp_irq function and add disable_isp_irq
Enable/Disable ISP irq is switched with "enable" parameter of enable_isp_irq(). It would be better splited to two such as enable_isp_irq()/disable_isp_irq(). But the enable_isp_irq() is no use in atomisp_cmd.c file. So remove the enable_isp_irq() function and add disable_isp_irq function only. Signed-off-by: Daeseok Youn <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 31991c8 commit 287666d

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -376,34 +376,16 @@ int atomisp_reset(struct atomisp_device *isp)
376376
}
377377

378378
/*
379-
* interrupt enable/disable functions
379+
* interrupt disable functions
380380
*/
381-
static void enable_isp_irq(enum hrt_isp_css_irq irq, bool enable)
382-
{
383-
if (enable) {
384-
irq_enable_channel(IRQ0_ID, irq);
385-
/*sh_css_hrt_irq_enable(irq, true, false);*/
386-
switch (irq) { /*We only have sp interrupt right now*/
387-
case hrt_isp_css_irq_sp:
388-
/*sh_css_hrt_irq_enable_sp(true);*/
389-
cnd_sp_irq_enable(SP0_ID, true);
390-
break;
391-
default:
392-
break;
393-
}
381+
static void disable_isp_irq(enum hrt_isp_css_irq irq)
382+
{
383+
irq_disable_channel(IRQ0_ID, irq);
394384

395-
} else {
396-
/*sh_css_hrt_irq_disable(irq);*/
397-
irq_disable_channel(IRQ0_ID, irq);
398-
switch (irq) {
399-
case hrt_isp_css_irq_sp:
400-
/*sh_css_hrt_irq_enable_sp(false);*/
401-
cnd_sp_irq_enable(SP0_ID, false);
402-
break;
403-
default:
404-
break;
405-
}
406-
}
385+
if (irq != hrt_isp_css_irq_sp)
386+
return;
387+
388+
cnd_sp_irq_enable(SP0_ID, false);
407389
}
408390

409391
/*
@@ -1416,7 +1398,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
14161398
}
14171399

14181400
/* clear irq */
1419-
enable_isp_irq(hrt_isp_css_irq_sp, false);
1401+
disable_isp_irq(hrt_isp_css_irq_sp);
14201402
clear_isp_irq(hrt_isp_css_irq_sp);
14211403

14221404
/* Set the SRSE to 3 before resetting */

0 commit comments

Comments
 (0)