From patchwork Thu Oct 19 16:31:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10017665 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 D47FC602C8 for ; Thu, 19 Oct 2017 16:31:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8EF128DA2 for ; Thu, 19 Oct 2017 16:31:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDAAC28DA6; Thu, 19 Oct 2017 16:31:47 +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 5A73C28DA2 for ; Thu, 19 Oct 2017 16:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbdJSQbq (ORCPT ); Thu, 19 Oct 2017 12:31:46 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:54313 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbdJSQbo (ORCPT ); Thu, 19 Oct 2017 12:31:44 -0400 Received: by mail-pg0-f66.google.com with SMTP id l24so7612754pgu.11 for ; Thu, 19 Oct 2017 09:31: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:in-reply-to:references; bh=H+iYgOo2yyN4mobfOK+E8Ev3NSNe3lZ9kbKyHOBC68M=; b=FzUTRUFg8LOxr0Jn7a8r0UsT3hA9wCK2WP+I+cGSOGcJiPehMx8nxxElJ/mY88FMls BWIRol2BFpCdRJAK78Tq9vlxmgegYP+XHeEaJFJgJ/S9+BVjG7P/LSwhQKkLV5eciz/7 58yqnGYydL5ZkMqBXwtVmq95f56QQRqRX9v6BigOF6fBGkP9QvsQYMI+1JjGL9C3SBut XMnTN8SBvbNx+0RK51YMMZlvm5zZBA8JxGme1dnBdknH0+vO0Pq6InLnnsOFHXAdRso6 Qsyq2gIVpNkGltZckVyJYVhdmOjsiGfqpy6Sxd5B14YzG/k2NkL+RBEd1XhczMY4ArES NEvA== 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=H+iYgOo2yyN4mobfOK+E8Ev3NSNe3lZ9kbKyHOBC68M=; b=pSWkTBOTRV4tosucZIMi5Jz/2Gkq2NGwjFyOTWnebkDszmVBei27I90DDfS2rWNXwc 5RDjdHs2+bzScStlIJ3RCLkhBMjliEoLmDFslY2JKPfxRiDfZYTjfKXaglYKc4D9L7sq Wec15qqJ0RR3uO3AbG7L2Csv6ba7vn+WzEEd5rGOUEIdawIT07lRj5sGs0KhSM2Dya7u bDcXhq1GbUFqKQnHD7fTdLYfV6fmjkJZOfm2Y55wntpZT/BdxmfE05pUfOTKOIKepcto hYAeJWe3sF4IeRWIY6sFjOzANG5ZP3klP+xZFEbNA79wKMq4glm59XbeGmxaW8D2gcfV HYUQ== X-Gm-Message-State: AMCzsaWwzq7JDFOMH5NQ+TIrci7bLCTGAU007Cj1PvBNaXiVQqN+1w9l EIH5PuIg14xSBq7lb9x8Crz4Hg== X-Google-Smtp-Source: ABhQp+RF3ifpya9W2Fv4HzulF0jle5BORKrlATVMtvJiHtxuTH0RsU5vrJLEEnz+QZpruqfUEpK92g== X-Received: by 10.84.236.7 with SMTP id q7mr1903373plk.87.1508430703924; Thu, 19 Oct 2017 09:31:43 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 09:31:43 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 4/4] media: ov5640: don't clear V4L2_SUBDEV_FL_IS_I2C Date: Fri, 20 Oct 2017 01:31:23 +0900 Message-Id: <1508430683-8674-5-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: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 39a2269..c89ed66 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -2271,7 +2271,7 @@ static int ov5640_probe(struct i2c_client *client, v4l2_i2c_subdev_init(&sensor->sd, client, &ov5640_subdev_ops); - sensor->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; + sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; sensor->pad.flags = MEDIA_PAD_FL_SOURCE; sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);