From patchwork Thu Oct 19 16:31:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10017661 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 ABF17602C8 for ; Thu, 19 Oct 2017 16:31:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A075D28DA2 for ; Thu, 19 Oct 2017 16:31:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9590528DA6; Thu, 19 Oct 2017 16:31:43 +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 43E8D28DA2 for ; Thu, 19 Oct 2017 16:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752866AbdJSQbl (ORCPT ); Thu, 19 Oct 2017 12:31:41 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:55527 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbdJSQbk (ORCPT ); Thu, 19 Oct 2017 12:31:40 -0400 Received: by mail-pf0-f193.google.com with SMTP id 17so6937214pfn.12 for ; Thu, 19 Oct 2017 09:31:40 -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=hndhyixyimve8YYMZ7nUIwC4Vb8VygJ/EvLRuxY/j/c=; b=Vv9ZVNud7SX6LXHbzibW5LximqLWN+z/YqrZqcJ8gUUg6djODRB+OB2nyg5qMTtAOL WH08GcBGb7wTw/CaxClkUQ1IRYRcGaRAL7GJRO9KdIMgBkYW9ygc8t7o5zi9fsEyKboG a5VkMSe9hLwbZ/CGC8+wql6xyFlG2OQKWYtu/yBcS1O+urNj3LTJbSjSw6wLm0UuOiRZ oTUS9LORfgi5g1cxytp5bgVKGDfv19omZlAcw9+beGBGzNMRCm/IpumIwaner4tLt5TF N6vn8zyUscFQgA9JMTLRLwh9inxCX7HbavQUd6iqwsr2jlUICqmTFjtoAuCUrpUMsoHs cuGQ== 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=hndhyixyimve8YYMZ7nUIwC4Vb8VygJ/EvLRuxY/j/c=; b=JL//NZUGLsCQXyUnfPn4IlUWWFWbewJHpQsLXd1RvgZIvxL3Gc7iE2Cat7jide3MSf WKt7eHacN2NEvM6O8fR5oylE3izZD8typOXuC2uQ+B/ZdoKlAJqoH0PdL+vOkbehNiiv 4d/+GCPynvzuq1JpojUG1CprXIZWq0mUbbTuviXs4MObBGV0cQF8W4PHfpVhnrKrMowY gISxD8WxRPaj6V8Le8qirkSU7cmey+CD8F3yF2mICdxuwbKBekoQRtDuvN84Tl4fEJdB GC+EOTO/5L3UYLsY3Vzc/zpoyIl/nJmMBn3iNScmJB3iCmGL9DScss9RlXCwj2oQCwFL prKA== X-Gm-Message-State: AMCzsaWqqQZjF3Tl9xZcftUsAqctHGB5TyOdgWl+XP7KGbxEjb4A4LvD moFVyThrfQ88odq7CDUnq18rKA== X-Google-Smtp-Source: ABhQp+ToK1PJV0Cj4rKbEbaDbSJsyGlug1+4WhFW5AYITMmb5nmq9Crr03hpQ1IzD1ZTBc84W1T2OQ== X-Received: by 10.99.180.73 with SMTP id n9mr1781548pgu.373.1508430699778; Thu, 19 Oct 2017 09:31:39 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 09:31:39 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Ramesh Shanmugasundaram , Mauro Carvalho Chehab Subject: [PATCH 2/4] media: max2175: don't clear V4L2_SUBDEV_FL_IS_I2C Date: Fri, 20 Oct 2017 01:31:21 +0900 Message-Id: <1508430683-8674-3-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: Ramesh Shanmugasundaram Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Acked-by: Ramesh Shanmugasundaram --- drivers/media/i2c/max2175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/max2175.c b/drivers/media/i2c/max2175.c index bf0e821..2f1966b 100644 --- a/drivers/media/i2c/max2175.c +++ b/drivers/media/i2c/max2175.c @@ -1345,7 +1345,7 @@ static int max2175_probe(struct i2c_client *client, v4l2_i2c_subdev_init(sd, client, &max2175_ops); ctx->client = client; - sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; /* Controls */ hdl = &ctx->ctrl_hdl;