From patchwork Wed Jan 5 20:35:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12704698 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95C89C433F5 for ; Wed, 5 Jan 2022 20:38:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tV3/B6kjk4QogCu4+MyxM0O9ke5XRgA2sYWg8rRZoys=; b=3/EgNaqnslNGIm gP2SpYvonIQ+cef4UdTkoOdBVTYs50TrAOqxy2PQ3pY459TFcKwPEDAj1o8vy/tmQv5IN/0yzx38P 6REeVLYtFj4eHJW0mGxLDf5dI1U6Tao3oR9YlN54c+h1E6dCGwadAFMHp+o1WtgqexUAvTCnMN+R4 hRQQSWWAZd7o+ulBENJf/6/UVbGZH15EKmxeBqWRt5zpI5NGENQWU05FyT6JnB2PM9nRK2f5uE8Yy YyjKTefM7hgjaxLgjiOlUG1ETLkxkzQjuEdCWEpA7NUONcrdotp0CpLleOqRNG/15yTdTC0ix+K/k YemybNoG5Ty/xN8R8AZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5D1r-00FluE-Im; Wed, 05 Jan 2022 20:37:03 +0000 Received: from mail-ua1-x92c.google.com ([2607:f8b0:4864:20::92c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5D1e-00FloX-3h; Wed, 05 Jan 2022 20:36:51 +0000 Received: by mail-ua1-x92c.google.com with SMTP id p37so606274uae.8; Wed, 05 Jan 2022 12:36:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=836CBDGgLoHqJrgB5kmQKKUyQ8f2Pjj7U9sJ+wlw5Ks=; b=op2tTAluLlXpi73l63bd8H6LIC3NZXyjd7FcX93LNvwSK/cwQAjkxr2Y4lCGdAnrCy 2P4foNdWT8S8IOeQLvuQ68oIKNfKbTHeyRqRCJZ7XKvlBXGFY677RbJU+uCOnB313oes UU6Gqi2iLYJ8Tngr2xayMylLJ9P4GkqK43QFK+U/QXxxaWWlHJdg4Lr6kUji+ULnofpR /wW2aFXHqBCwF+yhlnULisOVwf+VurI4ZwxjPrthK3s7wAM5J7IF+scJRQYaFhF9ZWmK WH12tpgc8X63hxf5YQUomqW05SUdDiJWNSQKCA8QLTxonZ9OOmK2/Pt5irlwysC1kXH6 jRVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=836CBDGgLoHqJrgB5kmQKKUyQ8f2Pjj7U9sJ+wlw5Ks=; b=kb5Sjxb045DB2VSH4ViE/RkMyUy7zPjdRduNhMT67osiB2afVNopMzBTZ6ji7VZb0U wvzggfQxjsuU1uMQBowH7UNJpiE4YI8oihVouGLDwMZGvM3XXhL78JxpDhPhSRoosQTx YX9k++BHrW51/7OiXjppJgvvS9hjRM/S2rpVWZD5UYL93ARqgsNmsnfg+LPTRPORnsdd UANQhKJ3bICox4VLSLMVsYIEqx3GfKIUdePYy2TSi7yRJ+XomU3fSwHpcDezstdetbFb G1FAfHnsOmz8Dr5KBItqVi0sO7+vooflsvQN7i0uhUfK5X1TEQ35blpPQjFhXXLV24Bc gyzQ== X-Gm-Message-State: AOAM533ArVjwjTGvCBHj0wKl1NQi+jAZakkcnZ43RXt8AzNNzir81unp rd+WifxplvU3ZSZ/wBjuips= X-Google-Smtp-Source: ABdhPJzOsjmNyjvD9eh8RW9ZrC9OqH+ROs6XuW3xkLWcicFQUnDLHWvMBuHJuYHUAHcvzjiIXPGnYg== X-Received: by 2002:ab0:3730:: with SMTP id s16mr4598247uag.83.1641415009126; Wed, 05 Jan 2022 12:36:49 -0800 (PST) Received: from localhost.localdomain ([181.22.170.52]) by smtp.gmail.com with ESMTPSA id t130sm7860vkc.32.2022.01.05.12.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 12:36:48 -0800 (PST) From: Gaston Gonzalez To: linux-staging@lists.linux.dev Cc: gregkh@linuxfoundation.org, nsaenz@kernel.org, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, juerg.haefliger@canonical.com, rdunlap@infradead.org, dave.stevenson@raspberrypi.com, stefan.wahren@i2se.com, unixbhaskar@gmail.com, mitaliborkar810@gmail.com, phil@raspberrypi.com, len.baker@gmx.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, gascoar@gmail.com Subject: [PATCH 2/6] staging: vc04_services: rename functions containing bm2835_* to bcm2835_* Date: Wed, 5 Jan 2022 17:35:44 -0300 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220105_123650_192954_1D6CEE71 X-CRM114-Status: GOOD ( 13.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In the kernel, all names related to the chip BCM2835 are always named bcm2835_*. To avoid confusion, and to make things more consistent, rename functions using bm2835_* to bcm2835_*. While at it, some realignments were made to improve readability. Suggested-by: Stefan Wahren Signed-off-by: Gaston Gonzalez --- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 ++++----- .../vc04_services/bcm2835-camera/bcm2835-camera.h | 6 ++---- drivers/staging/vc04_services/bcm2835-camera/controls.c | 9 ++++----- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 109021643c3f..159ac600d11e 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -1735,7 +1735,7 @@ static int mmal_init(struct bcm2835_mmal_dev *dev) &enable, sizeof(enable)); } - ret = bm2835_mmal_set_all_camera_controls(dev); + ret = bcm2835_mmal_set_all_camera_controls(dev); if (ret < 0) { v4l2_err(&dev->v4l2_dev, "%s: failed to set all camera controls: %d\n", __func__, ret); @@ -1769,8 +1769,7 @@ static int mmal_init(struct bcm2835_mmal_dev *dev) return ret; } -static int bm2835_mmal_init_device(struct bcm2835_mmal_dev *dev, - struct video_device *vfd) +static int bcm2835_mmal_init_device(struct bcm2835_mmal_dev *dev, struct video_device *vfd) { int ret; @@ -1908,7 +1907,7 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) } /* setup v4l controls */ - ret = bm2835_mmal_init_controls(dev, &dev->ctrl_handler); + ret = bcm2835_mmal_init_controls(dev, &dev->ctrl_handler); if (ret < 0) { v4l2_err(&dev->v4l2_dev, "%s: could not init controls: %d\n", __func__, ret); @@ -1940,7 +1939,7 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) goto unreg_dev; /* initialise video devices */ - ret = bm2835_mmal_init_device(dev, &dev->vdev); + ret = bcm2835_mmal_init_device(dev, &dev->vdev); if (ret < 0) { v4l2_err(&dev->v4l2_dev, "%s: could not init device: %d\n", __func__, ret); diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h index 338b7c142ae3..84ba789af120 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h @@ -110,11 +110,9 @@ struct bcm2835_mmal_dev { unsigned int rgb_bgr_swapped; }; -int bm2835_mmal_init_controls( - struct bcm2835_mmal_dev *dev, - struct v4l2_ctrl_handler *hdl); +int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl); -int bm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev); +int bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev); int set_framerate_params(struct bcm2835_mmal_dev *dev); /* Debug helpers */ diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index 03967a7d99a0..08fadc164b02 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -884,7 +884,7 @@ static int ctrl_set_scene_mode(struct bcm2835_mmal_dev *dev, return 0; } -static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +static int bcm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) { struct bcm2835_mmal_dev *dev = container_of(ctrl->handler, struct bcm2835_mmal_dev, ctrl_handler); @@ -904,7 +904,7 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) } static const struct v4l2_ctrl_ops bm2835_mmal_ctrl_ops = { - .s_ctrl = bm2835_mmal_s_ctrl, + .s_ctrl = bcm2835_mmal_s_ctrl, }; static const struct bcm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { @@ -1246,7 +1246,7 @@ static const struct bcm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { }, }; -int bm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev) +int bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev) { int c; int ret = 0; @@ -1311,8 +1311,7 @@ int set_framerate_params(struct bcm2835_mmal_dev *dev) return ret; } -int bm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, - struct v4l2_ctrl_handler *hdl) +int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl) { int c; const struct bcm2835_mmal_v4l2_ctrl *ctrl;