Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10612998ybi; Thu, 25 Jul 2019 02:25:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMxDiLwUEat76dGoa2TJev0W2KHvVo3887N4oT16hYiA9DYmB9TgDGkjKqYBYMykrj7zUW X-Received: by 2002:a17:90a:8a15:: with SMTP id w21mr92364617pjn.134.1564046726274; Thu, 25 Jul 2019 02:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564046726; cv=none; d=google.com; s=arc-20160816; b=KYtJn0E8unsrXnwqt18a5jYcMLEAb1DsnpuDnGrBaGvV8zdcRR8I1UbP/Za05sNbZ0 4oCHeozVuQ6EWn103jhs+ILUQGu67SoEJsutmhv0weCsUfkXzQ0KnhxGUCkmumBSXRFd MREDyGRdmHijaJVKaXrFO8IkKkqzIXc37qcgW4NlXljYrXwDcHvgDUo0Bg2CfmsNXagr 9JpItJCLrWZ3AjHao2uVYYLSyQLA+zHlkjkD/DNXmeqxcGa60e6GZEpMy3eGFoJLEDiv Pgcyb+nK9vR4nI9UDZttrnHnk7IcGqhZVI7O6kgX7Z/2XehVNiQyDPBAnbYCEy6B4/FI zYPw== 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=6tyOvzhEoHD5RgGvhBJKhKGtY9fnvB7UqhLSt8GlxMs=; b=HH9XDEJOXMRIcy76m1taryPQUgDI/00WcOOFuytji2SH0gWyNddYtTdzaGo1Jcp5CY 8Ys4XmPLYWOX6lM85BRdbF+f1W6yEDJZNuHPgGnj5z55U0mcV7cz+/+faGWGIoZ1w03f 6pOX9nMdvYLU714MFCTDHlAl7nfdairohv6kpNJGFAI2JimqflwPFxzoJQg78mBK95TX iAirDMnzK7lqjcUH4fcumDhVsDCA/h95XyTQeKZ7PIky1RVAganrmlRJqXEmOT06nOhK 8CHVim6L8tGyCpt5El7go3k0R7GqYVV/0D/NMlOHldS8yKGNsCs5kVv9SJfxnhysdIPW RSOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ueqD7TUy; 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 s24si10521949pgi.450.2019.07.25.02.25.06; Thu, 25 Jul 2019 02:25: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=ueqD7TUy; 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 S1729272AbfGXUcE (ORCPT + 99 others); Wed, 24 Jul 2019 16:32:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:48716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388361AbfGXT31 (ORCPT ); Wed, 24 Jul 2019 15:29:27 -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 084B6229F4; Wed, 24 Jul 2019 19:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996566; bh=xPh9hZ4D2KzU9QsTw+RRvyIX/frDF/JzpZJPjwEQ9Ks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ueqD7TUyI5w4pHXmZUyTWpHegp0a6OhwycOTCRFzAW/XQlQqC87Qk7JaNR/qHR3NH tTxEhc4odE9P2j0x5zVDT4CnUCUIyVyjekXfQDFP7z2BSdqf+Da6kfb49Kl/81j0zR crOWPk8BQpPJUvlpkKLRdMGCoE7Yp7ev2qKSAapo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.2 141/413] media: s5p-mfc: Make additional clocks optional Date: Wed, 24 Jul 2019 21:17:12 +0200 Message-Id: <20190724191745.084539991@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 e08efef8fe7db87206314c19b341612c719f891a ] Since the beginning the second clock ('special', 'sclk') was optional and it is not available on some variants of Exynos SoCs (i.e. Exynos5420 with v7 of MFC hardware). However commit 1bce6fb3edf1 ("[media] s5p-mfc: Rework clock handling") made handling of all specified clocks mandatory. This patch restores original behavior of the driver and fixes its operation on Exynos5420 SoCs. Fixes: 1bce6fb3edf1 ("[media] s5p-mfc: Rework clock handling") Signed-off-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c index 2e62f8721fa5..7d52431c2c83 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -34,6 +34,11 @@ int s5p_mfc_init_pm(struct s5p_mfc_dev *dev) for (i = 0; i < pm->num_clocks; i++) { pm->clocks[i] = devm_clk_get(pm->device, pm->clk_names[i]); if (IS_ERR(pm->clocks[i])) { + /* additional clocks are optional */ + if (i && PTR_ERR(pm->clocks[i]) == -ENOENT) { + pm->clocks[i] = NULL; + continue; + } mfc_err("Failed to get clock: %s\n", pm->clk_names[i]); return PTR_ERR(pm->clocks[i]); -- 2.20.1