From patchwork Fri Mar 10 11:34:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 39952 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmIp3-0004H4-3L; Fri, 10 Mar 2017 11:35:01 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1cmIp1-0000pp-jC; Fri, 10 Mar 2017 12:35:00 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933730AbdCJLev (ORCPT + 1 other); Fri, 10 Mar 2017 06:34:51 -0500 Received: from mga14.intel.com ([192.55.52.115]:53916 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933724AbdCJLet (ORCPT ); Fri, 10 Mar 2017 06:34:49 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2017 03:34:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,140,1486454400"; d="scan'208";a="1106990064" Received: from acox1-desk1.ger.corp.intel.com ([10.252.18.115]) by orsmga001.jf.intel.com with ESMTP; 10 Mar 2017 03:34:42 -0800 Subject: [PATCH 6/8] atomisp: tidy firmware loading code a little From: Alan Cox To: greg@kroah.com, linux-media@vger.kernel.org Date: Fri, 10 Mar 2017 11:34:41 +0000 Message-ID: <148914567405.25309.7279299274767425668.stgit@acox1-desk1.ger.corp.intel.com> In-Reply-To: <148914560647.25309.2276061224604665212.stgit@acox1-desk1.ger.corp.intel.com> References: <148914560647.25309.2276061224604665212.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-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.3.10.112417 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' The FWNAME define is never used so can be removed. The option to skip firmware loading isn't really Cherrytrail specific so remove this and complete the merging of the two driver versions for this file. Signed-off-by: Alan Cox --- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c index 97103b4..755c27c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c @@ -51,12 +51,10 @@ /* G-Min addition: pull this in from intel_mid_pm.h */ #define CSTATE_EXIT_LATENCY_C1 1 -#ifdef ISP2401 static uint skip_fwload = 0; module_param(skip_fwload, uint, 0644); -MODULE_PARM_DESC(skip_fwload, "Skip atomisp firmware load for COS"); +MODULE_PARM_DESC(skip_fwload, "Skip atomisp firmware load"); -#endif /* set reserved memory pool size in page */ unsigned int repool_pgnr; module_param(repool_pgnr, uint, 0644); @@ -1088,14 +1086,9 @@ atomisp_load_firmware(struct atomisp_device *isp) int rc; char *fw_path = NULL; -#ifdef ISP2401 if (skip_fwload) return NULL; -#endif -#if defined(ATOMISP_FWNAME) - fw_path = ATOMISP_FWNAME; -#else if (isp->media_dev.driver_version == ATOMISP_CSS_VERSION_21) { if (isp->media_dev.hw_revision == ((ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT) @@ -1112,7 +1105,6 @@ atomisp_load_firmware(struct atomisp_device *isp) | ATOMISP_HW_STEPPING_B0)) fw_path = "shisp_2400b0_v21.bin"; } -#endif if (!fw_path) { dev_err(isp->dev,