From patchwork Thu Oct 19 16:31:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10017659 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 A34BD602C8 for ; Thu, 19 Oct 2017 16:31:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97A2228DA2 for ; Thu, 19 Oct 2017 16:31:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C86B28DA6; Thu, 19 Oct 2017 16:31:42 +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 3E79A28DA2 for ; Thu, 19 Oct 2017 16:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752854AbdJSQbk (ORCPT ); Thu, 19 Oct 2017 12:31:40 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:49205 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752507AbdJSQbi (ORCPT ); Thu, 19 Oct 2017 12:31:38 -0400 Received: by mail-pg0-f68.google.com with SMTP id g6so7626342pgn.6 for ; Thu, 19 Oct 2017 09:31:38 -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=kNtVz2kQIoCEu/SV5pnfn3HgdaAPQQXLzG6Hp1aF17w=; b=SG3OXzz46v9a2ke1ApiTTVBLA3GZvMYc5FMCO6bA8mGVKrCoDHnGxK+8eYcQcGAvXj 983rd3VwxrDguYl4KPmDMVaUcapAxm/STZN2ZA8eKjFXUqoBqfEzBaysRytxrCm69g5+ fQbDmb4ZGRq7ywH57tgkWaMJb9afSpmbq3rc7hjwzFA4ugDfkH1AL+qsrvf6LfeRCNNS yJ+2AiTMZkum0FssN9uwUOPi29xWAH9u2Em9+qVfMDdtaKoh7xzRzTw//rWIl+gHZhXS Fbwp238XqHU3TgyqYFsSbqgRLyhstDCg1YHa91qvgFBf6Net3JZFXa+SuW3XIpPTwJIA /U3w== 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=kNtVz2kQIoCEu/SV5pnfn3HgdaAPQQXLzG6Hp1aF17w=; b=KQSQkqmFL7YXcZxXZxsgAGHmScfiVoC74TNC6Em2de+WG2dPK3h6t5zEni60zaJenm vY5LhWSL2bK+dMINoK3DPEB8i1cQC7OzfGlbClHBkmLF16oBrG1RPt7926a+3XPxpabM kbMHGuGthgmj/wGEfqRlVZxoT8aO1nZQft/nFAzEnun+1GglPAnPtPfZ1BW146gn/FDG m9fR8Rd/2WQBwaYWJkEgtsTKqOdwnwx9b0nbdwTAQXiz7fdrthC4KySVpE8eFjr9punj k79LEMSqgKeSQxQ85s7JZ3TOvcQcimHTeDIKXiazHPd6BSI+bP1qe5Ahb00sSqsokJcx pMqQ== X-Gm-Message-State: AMCzsaUtvJtifSCnHOxz7PmHwZ2KRHY928AcoxFlwlNe1LoPsy2Xx7gP jmdcrJNsi6xfTcbKTA6mIy0zzA== X-Google-Smtp-Source: ABhQp+SIWuby0sgyrKmpp96kgQ/kALPUU+6Vpg2czGi25cFAyfRyAk4kHUZSu5d02vRJCDpnYF+t1A== X-Received: by 10.99.60.11 with SMTP id j11mr1817710pga.21.1508430697840; Thu, 19 Oct 2017 09:31:37 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 09:31:37 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Lars-Peter Clausen , Mauro Carvalho Chehab Subject: [PATCH 1/4] media: adv7180: don't clear V4L2_SUBDEV_FL_IS_I2C Date: Fri, 20 Oct 2017 01:31:20 +0900 Message-Id: <1508430683-8674-2-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: Lars-Peter Clausen Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/adv7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 3df28f2..6fb818a 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -1328,7 +1328,7 @@ static int adv7180_probe(struct i2c_client *client, state->input = 0; sd = &state->sd; v4l2_i2c_subdev_init(sd, client, &adv7180_ops); - sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; ret = adv7180_init_controls(state); if (ret)