From patchwork Sat Jun 1 17:51:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10971447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B27F18EC for ; Sat, 1 Jun 2019 17:51:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D87628C19 for ; Sat, 1 Jun 2019 17:51:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E2AB28D0C; Sat, 1 Jun 2019 17:51:46 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 A916C28C19 for ; Sat, 1 Jun 2019 17:51:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726210AbfFARvo (ORCPT ); Sat, 1 Jun 2019 13:51:44 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:33646 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbfFARvo (ORCPT ); Sat, 1 Jun 2019 13:51:44 -0400 Received: by mail-qt1-f195.google.com with SMTP id 14so4985107qtf.0 for ; Sat, 01 Jun 2019 10:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RdduJKj2trEmgoT+DdzB//Cnls3cdUZxQ17xflBYkFw=; b=r/uAG6FiPAwZoo9zCfDolgFJK+vazEzAEbtRJ5F8X7kgyCwpx6hRWxTjxQKDV/yiyq e8Chj3C+ywJoU6QTTnZI1Wp+zH3G4Rmm7Y4x1kK1ibM3DQn4Ru65CVihcEq6y9PnzHvc Ni5gyh4VAomUV6ZdX5XCN/gK7uWVxfh6nx9z3xfpz5O2qKa8ysUsd0Ahj7uZd7iKE2El 0by+eCSJ7nIT5m3oDXMKv7Ec1yUclEv7Cr43nGQk3iBsmSY0b9zCxiecS0RbTW00bqUL yNwtD83HEGEHzz11ONr6FuGxgpZjw0uXgtqgehGL5WU5cUIcRYNU4IylTzYv23DJZehW vb0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RdduJKj2trEmgoT+DdzB//Cnls3cdUZxQ17xflBYkFw=; b=dfPj+VsGWm4g4S8kNpinMcdxVFig3/RfIiFmhtHvWSSFHqY3liq9IKBXWossoIwBzf uz8oaBXBWxZB+shIQmFRdNvTxAjsNZjZCTgrmRUHwV9ek/rysA/wCH9tkzE3qMI6UR26 SB8cmX5MMshDMOSSxsfb8HTeeZe4Go8+gd8+nQ1iPPMNe9Dum3f93fhSY/sq+pHqWU/b VoUMs7URcv4D9g66MzvdYNaPqtgM/enZ0ZG6PkGOQXJ4SUg6ud/92OSW6XGyAsLKCziQ 4T+buYqBYC9vdS8UmEbU+jVNPLQ6mOUSXHXdZAbUVzgpBeAdWVQ/JA3Zapxh0UZ0tmie ROvQ== X-Gm-Message-State: APjAAAXBqamSwUGZv3aaldA72fiqZ7A4LimiCjypAo0FIkhSAloQsG1Y w5IDHr8xTPeR8UbmOWPVVPc= X-Google-Smtp-Source: APXvYqw43sZUlXlMdFVeniixc4MneF8mLjjXI2+qkhbzAWVgkSBZ2wyJ3Dl4iXMa6U2/yRI3NoVocQ== X-Received: by 2002:a0c:986e:: with SMTP id e43mr14867334qvd.78.1559411503372; Sat, 01 Jun 2019 10:51:43 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id v8sm1558977qkj.77.2019.06.01.10.51.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 10:51:42 -0700 (PDT) From: Fabio Estevam To: hverkuil-cisco@xs4all.nl Cc: rmfrfs@gmail.com, p.zabel@pengutronix.de, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 1/3] media: imx7-media-csi: Use functions instead of macros Date: Sat, 1 Jun 2019 14:51:38 -0300 Message-Id: <20190601175140.16305-1-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 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 Currently there is a macro for reading and another macro for writing to the CSI registers. Functions can do parameter type checking, which leads to a safer code, so switch from macro to function implementation. Signed-off-by: Fabio Estevam Reviewed-by: Rui Miguel Silva --- drivers/staging/media/imx/imx7-media-csi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index b1af8694899e..8abdf253696d 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -195,10 +195,16 @@ struct imx7_csi { struct completion last_eof_completion; }; -#define imx7_csi_reg_read(_csi, _offset) \ - __raw_readl((_csi)->regbase + (_offset)) -#define imx7_csi_reg_write(_csi, _val, _offset) \ - __raw_writel(_val, (_csi)->regbase + (_offset)) +static u32 imx7_csi_reg_read(struct imx7_csi *csi, unsigned int offset) +{ + return readl(csi->regbase + offset); +} + +static void imx7_csi_reg_write(struct imx7_csi *csi, unsigned int value, + unsigned int offset) +{ + writel(value, csi->regbase + offset); +} static void imx7_csi_hw_reset(struct imx7_csi *csi) { From patchwork Sat Jun 1 17:51:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10971449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C1DB18EC for ; Sat, 1 Jun 2019 17:51:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A34728C19 for ; Sat, 1 Jun 2019 17:51:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E83D28D0C; Sat, 1 Jun 2019 17:51:50 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 1638828C19 for ; Sat, 1 Jun 2019 17:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfFARvs (ORCPT ); Sat, 1 Jun 2019 13:51:48 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:32788 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbfFARvs (ORCPT ); Sat, 1 Jun 2019 13:51:48 -0400 Received: by mail-qk1-f195.google.com with SMTP id p18so8532507qkk.0 for ; Sat, 01 Jun 2019 10:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E8aBgCs0cgW9VjIrxTvjzpo/jcx08bX9n2Xw93Iuv4M=; b=FLr+5Cpzacgn0CKelkyrVLdGGJKik81xPekStaerfSGvesHwpGaFJF3rzKI8CFcWFH hjHqa1fbpUJW6LsFkWvsQsP/w9U77HeIMVNmfN6NX7I1RoBr59kfLt1ctc8AyMWNbW63 yyk0xUHqIw8vYENDwwVenKmpavA2lyG1k59vZTBk+/X4yQxzrd7GE4vee/Yzjq0wkzJz Zrdp21VmdAa3azZvmAsvgD5OuKVAglvHvvxWookp1W4RrVZkKWFQx3EfIRuGzg6KlaHE NPO6Pxw+jl6ZpxZY7XNAwCE8mi8BxuJjVgOqp6ErQPOdxWYSMl4lCcSMsU6EhA89tWXp RMvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E8aBgCs0cgW9VjIrxTvjzpo/jcx08bX9n2Xw93Iuv4M=; b=ZbN+PhrhvOfTb3zVfO3IX1VlKipScEsbDOmi9kI/N1R61jFqIJgoWq0meRibjpa/9k 9SikPNGJnCgNhxoSK3aR8tnsFSu2oRR1j/ZF/3o8XXBRKAGcahrSnmDzCVBwwFLNJ/gD hNkfgtNq4l0MASODi4C5sCMtBqiO0M0Xne7RvHQuuiqKNImTqWdDvl0h+sI1QtJjVEvl 7Pofcq+P0WLtsO22FqwPwa+RrwFrJzfFtgHEqr2IDzsmgOp6a2tZlTCxNELXL+FnUOuE 5tSAVCdzXMTJaNw1m1VJWxxwCcahOAhdS1VKokApGPZ3aHEv7cE+4dVp/qaGy7OQdQo/ UZJQ== X-Gm-Message-State: APjAAAX4h/gtSaDQLn+E0205/G0fxVPOPd2zJQJDnrWqy5ekMGkdRJQZ +W3gOSRjyF/E61IX1uRUiYg= X-Google-Smtp-Source: APXvYqwD8uS+LVmX1ZCuaW708jWqiYEbcj8IeSPOJNoVskBNcng0e8W5bM5pchj9RJoOi6VthuzGew== X-Received: by 2002:a37:68ca:: with SMTP id d193mr3259259qkc.240.1559411506625; Sat, 01 Jun 2019 10:51:46 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id v8sm1558977qkj.77.2019.06.01.10.51.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 10:51:45 -0700 (PDT) From: Fabio Estevam To: hverkuil-cisco@xs4all.nl Cc: rmfrfs@gmail.com, p.zabel@pengutronix.de, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/3] media: imx7-media-csi: Use u32 for storing register reads Date: Sat, 1 Jun 2019 14:51:39 -0300 Message-Id: <20190601175140.16305-2-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190601175140.16305-1-festevam@gmail.com> References: <20190601175140.16305-1-festevam@gmail.com> 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 The CSI registers are 32-bit, so using u32 type is more suitable for storing the values from register reads. Switch from 'unsigned long' to 'u32' type. Signed-off-by: Fabio Estevam --- drivers/staging/media/imx/imx7-media-csi.c | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index 8abdf253696d..7abea8681062 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -217,9 +217,9 @@ static void imx7_csi_hw_reset(struct imx7_csi *csi) imx7_csi_reg_write(csi, CSICR3_RESET_VAL, CSI_CSICR3); } -static unsigned long imx7_csi_irq_clear(struct imx7_csi *csi) +static u32 imx7_csi_irq_clear(struct imx7_csi *csi) { - unsigned long isr; + u32 isr; isr = imx7_csi_reg_read(csi, CSI_CSISR); imx7_csi_reg_write(csi, isr, CSI_CSISR); @@ -245,7 +245,7 @@ static void imx7_csi_init_interface(struct imx7_csi *csi) static void imx7_csi_hw_enable_irq(struct imx7_csi *csi) { - unsigned long cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); + u32 cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); cr1 |= BIT_SOF_INTEN; cr1 |= BIT_RFF_OR_INT; @@ -261,7 +261,7 @@ static void imx7_csi_hw_enable_irq(struct imx7_csi *csi) static void imx7_csi_hw_disable_irq(struct imx7_csi *csi) { - unsigned long cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); + u32 cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); cr1 &= ~BIT_SOF_INTEN; cr1 &= ~BIT_RFF_OR_INT; @@ -274,7 +274,7 @@ static void imx7_csi_hw_disable_irq(struct imx7_csi *csi) static void imx7_csi_hw_enable(struct imx7_csi *csi) { - unsigned long cr = imx7_csi_reg_read(csi, CSI_CSICR18); + u32 cr = imx7_csi_reg_read(csi, CSI_CSICR18); cr |= BIT_CSI_HW_ENABLE; @@ -283,7 +283,7 @@ static void imx7_csi_hw_enable(struct imx7_csi *csi) static void imx7_csi_hw_disable(struct imx7_csi *csi) { - unsigned long cr = imx7_csi_reg_read(csi, CSI_CSICR18); + u32 cr = imx7_csi_reg_read(csi, CSI_CSICR18); cr &= ~BIT_CSI_HW_ENABLE; @@ -292,7 +292,7 @@ static void imx7_csi_hw_disable(struct imx7_csi *csi) static void imx7_csi_dma_reflash(struct imx7_csi *csi) { - unsigned long cr3 = imx7_csi_reg_read(csi, CSI_CSICR18); + u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR18); cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); cr3 |= BIT_DMA_REFLASH_RFF; @@ -301,7 +301,7 @@ static void imx7_csi_dma_reflash(struct imx7_csi *csi) static void imx7_csi_rx_fifo_clear(struct imx7_csi *csi) { - unsigned long cr1; + u32 cr1; cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); imx7_csi_reg_write(csi, cr1 & ~BIT_FCC, CSI_CSICR1); @@ -319,7 +319,7 @@ static void imx7_csi_buf_stride_set(struct imx7_csi *csi, u32 stride) static void imx7_csi_deinterlace_enable(struct imx7_csi *csi, bool enable) { - unsigned long cr18 = imx7_csi_reg_read(csi, CSI_CSICR18); + u32 cr18 = imx7_csi_reg_read(csi, CSI_CSICR18); if (enable) cr18 |= BIT_DEINTERLACE_EN; @@ -331,8 +331,8 @@ static void imx7_csi_deinterlace_enable(struct imx7_csi *csi, bool enable) static void imx7_csi_dmareq_rff_enable(struct imx7_csi *csi) { - unsigned long cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); - unsigned long cr2 = imx7_csi_reg_read(csi, CSI_CSICR2); + u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); + u32 cr2 = imx7_csi_reg_read(csi, CSI_CSICR2); /* Burst Type of DMA Transfer from RxFIFO. INCR16 */ cr2 |= 0xC0000000; @@ -348,7 +348,7 @@ static void imx7_csi_dmareq_rff_enable(struct imx7_csi *csi) static void imx7_csi_dmareq_rff_disable(struct imx7_csi *csi) { - unsigned long cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); + u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); cr3 &= ~BIT_DMA_REQ_EN_RFF; cr3 &= ~BIT_HRESP_ERR_EN; @@ -647,7 +647,7 @@ static void imx7_csi_vb2_buf_done(struct imx7_csi *csi) static irqreturn_t imx7_csi_irq_handler(int irq, void *data) { struct imx7_csi *csi = data; - unsigned long status; + u32 status; spin_lock(&csi->irqlock); From patchwork Sat Jun 1 17:51:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10971451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91B2A18EC for ; Sat, 1 Jun 2019 17:51:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DDC728C19 for ; Sat, 1 Jun 2019 17:51:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E8EB28D15; Sat, 1 Jun 2019 17:51:52 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 38D8A28C19 for ; Sat, 1 Jun 2019 17:51:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbfFARvu (ORCPT ); Sat, 1 Jun 2019 13:51:50 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:44961 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbfFARvu (ORCPT ); Sat, 1 Jun 2019 13:51:50 -0400 Received: by mail-qk1-f196.google.com with SMTP id w187so8465612qkb.11 for ; Sat, 01 Jun 2019 10:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QhOTOR9ZhHXErxoDIUyKQboLl6Rpn3QrGCz20NVmVXQ=; b=FS1FAFGAgIzP3T2T4lOWSFhc5N1+pNVJk0iUx+GwM/56VgK7z64EP0eVw7gN4ObfpU 7juVKX6/HTZpWlUepsNgsFUWSq0F6frlIvlrZY+ijV256BwgNBgMkUn81jLruh4qq1Fh rGZQV02RMLy9I1sk+coW6nW71JhqDPNVGnvaghWB2yGt/xK2O/ilT//nHKUxmgDRqw3y TneRq7Li5zHqSA5MCYeC68lmhYFDH47PbxwIh0aGY5iy2JNN3ZuGX/ygnNgoMndIdRf9 K6m4eJH8xrmItVWp6lOz0gXm/78jdck74l2oGx1xteYNaQ/WRXf3eKtlgONB2sSUgLw8 KNrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QhOTOR9ZhHXErxoDIUyKQboLl6Rpn3QrGCz20NVmVXQ=; b=ap06LyaoQOM+uk/yOUWhhchMlM7f13aB9N3DAGNYYD3xW/C+NFEqw+fWVs9LLK5Lsk BQc+ojPOQ/bZfNX1T+lT1f92PotqiQiF9W6IeGKI+tAXoqMhO7Gj/p7vMFOJhzUqWQTb gkCQrnTtTm/bH9Ce4HPWSUGEkmULoatgiY8T2jR9Ng/ddHatusBXlcKHFfABWNKbWkS9 S8nq46f5ZYT80mrJG6zWkPMPh4IwBn46rYAKDQC0Ek75b5Sh0BuIxLiGuC6TLRGmv+nv YW/4G4bwLeRAtxy5Zc/DRdTnRyyltjiK3yAU6xLfIo/WtPNX0UeXk9R6SGQHMiEOxIS0 C2Dw== X-Gm-Message-State: APjAAAV6jgxC87tzV/Wk96mLFTsy9XFfEblWcs+SE/mzkp/OUbCUedqI iZwNtkaTQcluU5D+IMzEjJU= X-Google-Smtp-Source: APXvYqwkDFhfQbabLwClD+TdFEaI9M77Msti+l4Kts9BmBGhFN730G0k1TecbUUF1Xp7fjEjz19pkw== X-Received: by 2002:a37:68d2:: with SMTP id d201mr14298019qkc.65.1559411509489; Sat, 01 Jun 2019 10:51:49 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id v8sm1558977qkj.77.2019.06.01.10.51.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jun 2019 10:51:48 -0700 (PDT) From: Fabio Estevam To: hverkuil-cisco@xs4all.nl Cc: rmfrfs@gmail.com, p.zabel@pengutronix.de, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 3/3] media: imx7-media-csi: Remove unneeded error message Date: Sat, 1 Jun 2019 14:51:40 -0300 Message-Id: <20190601175140.16305-3-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190601175140.16305-1-festevam@gmail.com> References: <20190601175140.16305-1-festevam@gmail.com> 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 In case of ioremap failure, the core code will take care of printing the error message, so there is no need for having a local error message in the driver. Signed-off-by: Fabio Estevam --- drivers/staging/media/imx/imx7-media-csi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index 7abea8681062..fead72952aba 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -1194,10 +1194,8 @@ static int imx7_csi_probe(struct platform_device *pdev) } csi->regbase = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(csi->regbase)) { - dev_err(dev, "Failed platform resources map\n"); + if (IS_ERR(csi->regbase)) return PTR_ERR(csi->regbase); - } spin_lock_init(&csi->irqlock); mutex_init(&csi->lock);