From patchwork Thu Oct 19 16:31:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10017663 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 B0148602C8 for ; Thu, 19 Oct 2017 16:31:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A490C28DA2 for ; Thu, 19 Oct 2017 16:31:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 997F628DA6; Thu, 19 Oct 2017 16:31: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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 4FAE428DA2 for ; Thu, 19 Oct 2017 16:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbdJSQbo (ORCPT ); Thu, 19 Oct 2017 12:31:44 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44864 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbdJSQbm (ORCPT ); Thu, 19 Oct 2017 12:31:42 -0400 Received: by mail-pg0-f67.google.com with SMTP id j3so7627988pga.1 for ; Thu, 19 Oct 2017 09:31:41 -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=x9NjIJpXOFK++fjGawUMcKhy67GTZvTa/7r87Cjuucc=; b=CphXJYgmHOuTu8rZDGI3l0JCbgQ1FoM3VEubsPzSN+lZZlyfJyIJqLQ5nzRWjfPC4x DpVxRzVJylOEXz9HU9wg7vYsojELL3DgrqqXeRab/hPHKROp50SXG2IOsTJBwGCtbg1o XFpr3EYhbCNnDFdS4MFLC7HhToD7TFzqii4E+dJGpxuVaxtbx+1k7LZhG/fog29K03jg rdKLfxpgO9yVoN3pj3W4g8Zpd4Ao+KS1/UlxbHH6aOVNmkJfnJJT5VR+Hoq9ulugzzaq vXy87kzUK6Ml5yTo5j8CmMTsrnrXxVJevJTxbZooT9QCzRzAh76X58WnUT53X4LhBMU/ e5rA== 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=x9NjIJpXOFK++fjGawUMcKhy67GTZvTa/7r87Cjuucc=; b=C+qbZNeR8DkLwDaYgY+Rl5+PhjytVMD/ZtQa8fcoWipcF9Njp5Zyik1bjs2LpmSGJh g/j6tTVn+0Zorjc4mOaTkUB6rumdAXk3iZGEisDhbUdEWVy+JfZezHrwP/AeOL4hjklO yt2nOZnAdOzJkGVH2KMR7BPJ1fcsSV/Iuf/BQbLW833cAZypXvKx5iJvvLKF54QNcHWt GF/67Tk1B1Rw6NPScYrBDx4KLkSpKeYhCFqT3aTxBnkUhWHLwaBzDmWcjKYf1Rg4etQI yqK14Bq2VSx/Evd+mFYv9WW5/y/KFlfsTavPEzuMJNFzfY6x/d528cczbnhzPf5REFmH QE3w== X-Gm-Message-State: AMCzsaVocInJOQanNCdRgNq/qKd/jkdEXOKYcUS4oRQwXvMeFwxF1Qih b8oQ6IEckCEB0/LHJJ1Uml9qkw== X-Google-Smtp-Source: ABhQp+SzLIvWwYilu8+bImj9PEsAULkFzd9Op/iWaY5NNQlroe91/k8DyxNdacjuHaScduSBxqaA9A== X-Received: by 10.84.248.133 with SMTP id q5mr1916009pll.102.1508430701608; Thu, 19 Oct 2017 09:31:41 -0700 (PDT) Received: from localhost.localdomain ([240f:4:c2bc:1:57d:7ff0:9e26:d0f3]) by smtp.gmail.com with ESMTPSA id c8sm27283324pfm.47.2017.10.19.09.31.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 09:31:41 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Mauro Carvalho Chehab Subject: [PATCH 3/4] media: ov2640: don't clear V4L2_SUBDEV_FL_IS_I2C Date: Fri, 20 Oct 2017 01:31:22 +0900 Message-Id: <1508430683-8674-4-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508430683-8674-1-git-send-email-akinobu.mita@gmail.com> References: <1508430683-8674-1-git-send-email-akinobu.mita@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 v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index e6d0c1f..5b035d1 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -1116,7 +1116,7 @@ static int ov2640_probe(struct i2c_client *client, goto err_clk; v4l2_i2c_subdev_init(&priv->subdev, client, &ov2640_subdev_ops); - priv->subdev.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; + priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; v4l2_ctrl_handler_init(&priv->hdl, 2); v4l2_ctrl_new_std(&priv->hdl, &ov2640_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0);