Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3904553ybi; Mon, 29 Jul 2019 15:03:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyS8ZlR4/0JL0rMhzVkkm9ELiXrcf6ND+ztRKz8d7impsSRjJvEkcwK0QKLn3lrwVx1qQOt X-Received: by 2002:a17:90a:1b4a:: with SMTP id q68mr113788274pjq.61.1564437788936; Mon, 29 Jul 2019 15:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564437788; cv=none; d=google.com; s=arc-20160816; b=Vzivd0r/qX7W98uVyGPY0lf3ITIv4Zv7PgnVPZmOnV8kXziIjd/+Anq72ovlCDqW25 ja4SDN9J8T3mEsqaGR1f9N8yh9AXxT+QnAYRGFxcP44fxmeKOD6xGsHpmsIvjeDemjnU OCsh0xi5psfbqj9lyhphb2tssYYuaeJwhKZ+TDomYG+iApRvCHniGJrhoFEQJiVIUuyG DRGkridJ5zav5HrWPi36HXDqz/zwcTC03L5tl5DiSzY+6fgQwjfPm3DlhM/ibNmAbRN6 PMEHsd3XObXlJXS02DHdLGnz6p3pWdNb8J/bi7XlEkN+GvyM05R0OMFp9DfWedyNPnV3 TEYg== 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=rCYGsQ2KcTuZyt8IgxMDrg5uMd6CM3vJ1T45Gv2xJyk=; b=sPM5GDse4wssG7BX0S+NhwjdxaEDjjW36H4XZXgv+XG/PYMkJml0lqyx3lGtYZXv+W muD/B72CD0zKbjdgb3Uv6Ast/QA6Qk4l0cfKmdqQCWjqh1ZppHUS6vTj+kOoXdZEJ/Ba FCmw0l35oeIerDNCurPg4zIooWniz6VW/UG7Zmt3JwQ5Ny24Ecw5Aqny9gTuXgF1bfTu LeSlSdpWLF0zDZHkvEfROljJ7e5CpNrBgz5L0OE6V3ciUM/mXQzALxi3ONPmL6z7SfiC 6+V3YCF0gyCtlaFnfV4ecFxZY5FPhDciLtZA7AAP/7XBF2c+iCT/p6dOepFCY6W6QkSf 2xpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nddZKNxj; 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 b20si7362276plz.327.2019.07.29.15.02.54; Mon, 29 Jul 2019 15:03:08 -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=nddZKNxj; 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 S1730017AbfG2T2s (ORCPT + 99 others); Mon, 29 Jul 2019 15:28:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:41348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbfG2T2i (ORCPT ); Mon, 29 Jul 2019 15:28:38 -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 AE6E42070B; Mon, 29 Jul 2019 19:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428517; bh=S4svMKdHuAGeN67O6kmLtk+ZNOQ7EGTIYKVayCpUo8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nddZKNxj+h5VIs0IFXQVdsrgoWnPjcxcgeeNehuqhAhgtQOVERHMYLKZkNf9qZdJL daA0IkJwzqkkVSWtHDWtAr2zsRAE58gGTAbymenuXLsRS3sqRXrwqqtuxrnDIrk4jU ozY4+vwD6zCGy57izWEEljpxCoRz8h6Ndp46X3iA= 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 4.14 062/293] media: s5p-mfc: Make additional clocks optional Date: Mon, 29 Jul 2019 21:19:13 +0200 Message-Id: <20190729190829.262713031@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 eb85cedc5ef3..5e080f32b0e8 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_pm.c @@ -38,6 +38,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