Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9929965ybi; Wed, 24 Jul 2019 12:31:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6Y68Evqu/MSRSva3YE5WEhcarZTfJn9p3/cQjpuBki0BhGKbBtg8PimnWPSk4WZb5tLYY X-Received: by 2002:a62:e20b:: with SMTP id a11mr13028142pfi.0.1563996686807; Wed, 24 Jul 2019 12:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563996686; cv=none; d=google.com; s=arc-20160816; b=P1oJF5IIbGvOrbjC9Vn9WRm3vRB+OYdQ3VoQ44XnEW9HZAmvzA4jyjj/3lC62Eqs60 egbbn37ZdH98lWoYjD/UONvBjLFqy+qxMaY9XjcU7OY0Gl56d0Fj906lHoP3jVgDMoZ0 2fFBzBJacid7LKCyjtn4TPgfFk+hDR6YUI5Dp4klwsyO2dFdtXe6lprgnw3ogXQ5+x3E M1gd69RyjKHJMhzwu3oC5kFvnId7EaciEWJl9CKlEWvKu6x6B5H1ufvsaDpbt/xuBXSl cJvOJaQNp5d0jQluXdXRARhog+uuJ/Av2KAqoXk617SmaHFmffCEiReize0cOr3XIKWR Uvrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S6diWZG6u2D7czY2xVkVeeGCGe1VwijJPCetLGL+G6s=; b=d34tYjX5PWiLeICvWMoq0XUShjEv28ZMin5fHphw+YJivXOfokfDpJ8xI1ZqG0T/iW S9P2Ar5VyP8bxZqF80pWv8XQ5d7QaLMO4gvpuBCFDmLXEHTzZipq+tmWUQzNYM68P6Aa WJhUPgmO61r2fhvxiGx6cOoWwqqz6BYUFcHxN5uUHoGkROXGfhYqIycsjwOcgiKuuE/x tBb1M0Xt438UwaoI7zInIQJqMWj9lVBG6UwAYzdu1+PekrIsOUIgM61SSe/mABBWlzwz uRjDXPgNSJGlIn6ErZgB+zlaWWqT7lHJCzYz9j5377XaiBkVQhm08eYp95uTAVN5EfFw xMCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dU3Oop7A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r33si13706718pjb.76.2019.07.24.12.31.11; Wed, 24 Jul 2019 12:31:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dU3Oop7A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729020AbfGXT3m (ORCPT + 99 others); Wed, 24 Jul 2019 15:29:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:49130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729350AbfGXT3j (ORCPT ); Wed, 24 Jul 2019 15:29:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FDDA21951; Wed, 24 Jul 2019 19:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996578; bh=2DEC+ycr/wGnBPp1D0XeMMkcHq/HhgHmZ/lIM1SAbgM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dU3Oop7AgJJsQkWPNYTEGOTbBl1xlNtN3HwATFElSU+JUe9TltWUDIOX98tO6TVGl 4E6hBAsZaMliYWUt4OAbSjQvwMsO7dr5Cwp3qxu+h6zUA6+ZuL1pFMSoO5suv5Cflf nI3coegF6U4+NNvxyJCAts32jO/N+6ABJGc3IL98= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Jarzmik , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.2 145/413] media: mt9m111: fix fw-node refactoring Date: Wed, 24 Jul 2019 21:17:16 +0200 Message-Id: <20190724191745.325875442@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8d4e29a51a954b43e06d916772fa4f50b7e5bbd6 ] In the patch refactoring the fw-node, the mt9m111 was broken for all platform_data based platforms, which were the first aim of this driver. Only the devicetree platform are still functional, probably because the testing was done on these. The result is that -EINVAL is systematically return for such platforms, what this patch fixes. [Sakari Ailus: Rework this to resolve a merge conflict and use dev_fwnode] Fixes: 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity") Signed-off-by: Robert Jarzmik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/mt9m111.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index 362c3b93636e..5a642b5ad076 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -1245,9 +1245,11 @@ static int mt9m111_probe(struct i2c_client *client, if (!mt9m111) return -ENOMEM; - ret = mt9m111_probe_fw(client, mt9m111); - if (ret) - return ret; + if (dev_fwnode(&client->dev)) { + ret = mt9m111_probe_fw(client, mt9m111); + if (ret) + return ret; + } mt9m111->clk = v4l2_clk_get(&client->dev, "mclk"); if (IS_ERR(mt9m111->clk)) -- 2.20.1