From patchwork Wed Apr 12 18:20:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 9678157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A45AF60383 for ; Wed, 12 Apr 2017 18:21:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AFF528630 for ; Wed, 12 Apr 2017 18:21:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FE5F2867F; Wed, 12 Apr 2017 18:21:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E324B28630 for ; Wed, 12 Apr 2017 18:20:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754869AbdDLSU6 (ORCPT ); Wed, 12 Apr 2017 14:20:58 -0400 Received: from mga14.intel.com ([192.55.52.115]:43789 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754659AbdDLSU6 (ORCPT ); Wed, 12 Apr 2017 14:20:58 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2017 11:20:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,191,1488873600"; d="scan'208";a="955335866" Received: from acox1-desk1.ger.corp.intel.com ([10.252.16.134]) by orsmga003.jf.intel.com with ESMTP; 12 Apr 2017 11:20:26 -0700 Subject: [PATCH 03/14] staging: atomisp: remove enable_isp_irq function and add disable_isp_irq From: Alan Cox To: greg@kroah.com, linux-media@vger.kernel.org Date: Wed, 12 Apr 2017 19:20:22 +0100 Message-ID: <149202121717.16615.8267343060617686506.stgit@acox1-desk1.ger.corp.intel.com> In-Reply-To: <149202119790.16615.4841216953457109397.stgit@acox1-desk1.ger.corp.intel.com> References: <149202119790.16615.4841216953457109397.stgit@acox1-desk1.ger.corp.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daeseok Youn 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 Signed-off-by: Alan Cox --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 36 +++++--------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c index 9ad5146..08606cb 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c @@ -376,34 +376,16 @@ int atomisp_reset(struct atomisp_device *isp) } /* - * interrupt enable/disable functions + * interrupt disable functions */ -static void enable_isp_irq(enum hrt_isp_css_irq irq, bool enable) -{ - if (enable) { - irq_enable_channel(IRQ0_ID, irq); - /*sh_css_hrt_irq_enable(irq, true, false);*/ - switch (irq) { /*We only have sp interrupt right now*/ - case hrt_isp_css_irq_sp: - /*sh_css_hrt_irq_enable_sp(true);*/ - cnd_sp_irq_enable(SP0_ID, true); - break; - default: - break; - } +static void disable_isp_irq(enum hrt_isp_css_irq irq) +{ + irq_disable_channel(IRQ0_ID, irq); - } else { - /*sh_css_hrt_irq_disable(irq);*/ - irq_disable_channel(IRQ0_ID, irq); - switch (irq) { - case hrt_isp_css_irq_sp: - /*sh_css_hrt_irq_enable_sp(false);*/ - cnd_sp_irq_enable(SP0_ID, false); - break; - default: - break; - } - } + if (irq != hrt_isp_css_irq_sp) + return; + + cnd_sp_irq_enable(SP0_ID, false); } /* @@ -1416,7 +1398,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout) } /* clear irq */ - enable_isp_irq(hrt_isp_css_irq_sp, false); + disable_isp_irq(hrt_isp_css_irq_sp); clear_isp_irq(hrt_isp_css_irq_sp); /* Set the SRSE to 3 before resetting */