From patchwork Sun May 6 14:19:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10382835 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 01E8260236 for ; Sun, 6 May 2018 14:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4CF32892B for ; Sun, 6 May 2018 14:20:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D951228970; Sun, 6 May 2018 14:20:31 +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=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, T_DKIM_INVALID 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 84BF92893C for ; Sun, 6 May 2018 14:20:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751802AbeEFOUH (ORCPT ); Sun, 6 May 2018 10:20:07 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35934 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777AbeEFOUF (ORCPT ); Sun, 6 May 2018 10:20:05 -0400 Received: by mail-pg0-f68.google.com with SMTP id z129-v6so14278142pgz.3; Sun, 06 May 2018 07:20:05 -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=NRLO4Ogixu1OY85Y6L5b5yobBEiShwBw05b5qH4ypQw=; b=krjpY87JZrFZEp/yg+ZG9a/DvA78dMPHvcZuCCivglYFEt1N3BW6plF4SF2m/5iwPq XzNPbUd0n9fEtTSG1vwuftuuFxwe61DJv/yEjAnmuLBz4g8zVxLsvfmzUI3BPe73ETAQ Y8FViIv8cuBk3kJynitDTvazAlGp7+WBvuRPBCB8TWnJKVRqJIDKDfx9kzrH+iTOpQab nvgWqz+wV09Wy4YykJnW0vDFIqtS35W3EZkOeuKSgTL0UpLp9LGI5q/QggtlY0H/TVGW bG/+sWHpqnF+otW78Ot9ZTFq0WYEERz3cX9ftVkPcOjTGxbZSZyVgVGzYFdgfH6BU5PY 1acw== 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=NRLO4Ogixu1OY85Y6L5b5yobBEiShwBw05b5qH4ypQw=; b=Pg9GcWmj2O/FAHkDFrKs5tXq75tSMx+m8V0cp8Sp56LTC8SXbHUq16Hzy8FxigWiYh d83xZj6r+lxPpse39RqvyzHcKFIbklKKDI5CQkgRv2lPdMVB8hK0fAwambAl3xdC4Bs4 mXnPkSXuV5WX/cUsHSWz334G39I8RwqPTpuA/C3r5rJFeRqLXLH2c81rdYWp3whfAEic 7f5sosy6Hsf5M5FpSijtpuqBXJnJM9b6GjLhs+z0XTxirQySNF32bTUzWYisT2qLfntl n4eRVb6SIdWTdnqXMeQPs2Mbl+CP02JIycRLB8MmmqfAnd0Nz4pWjDAgs8hdJxTnMpaT mn3g== X-Gm-Message-State: ALQs6tB7d6qF9z9J04XCXxL9AStNJGDUi5q5YPaCRai3THEOl8xs7N4Y Z+iSbQoZozRxUfvpLmdL0AlC3g== X-Google-Smtp-Source: AB8JxZqWiakWRgas3MTRl4KSL8X2ymhp1u1Igfct3IL39R80bXspDhLApdc20IlaBYB3r4cDVxmPDw== X-Received: by 2002:a17:902:70c4:: with SMTP id l4-v6mr32241644plt.174.1525616405323; Sun, 06 May 2018 07:20:05 -0700 (PDT) Received: from localhost.localdomain ([240f:4:c2bc:1:141a:15e1:5268:11ce]) by smtp.gmail.com with ESMTPSA id s88sm58766771pfe.43.2018.05.06.07.20.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 May 2018 07:20:04 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Akinobu Mita , Jacopo Mondi , Laurent Pinchart , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH v5 07/14] media: ov772x: omit consumer ID when getting clock reference Date: Sun, 6 May 2018 23:19:22 +0900 Message-Id: <1525616369-8843-8-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525616369-8843-1-git-send-email-akinobu.mita@gmail.com> References: <1525616369-8843-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 Currently the ov772x driver obtains a clock with a specific consumer ID. As there's a single clock for this driver, we could omit clock-names property in device tree by passing NULL as a consumer ID to clk_get(). Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Suggested-by: Laurent Pinchart Tested-by: Jacopo Mondi Signed-off-by: Akinobu Mita --- * v5 - No changes arch/sh/boards/mach-migor/setup.c | 2 +- drivers/media/i2c/ov772x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index 73b9ee4..11f8001 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -593,7 +593,7 @@ static int __init migor_devices_setup(void) } /* Add a clock alias for ov7725 xclk source. */ - clk_add_alias("xclk", "0-0021", "video_clk", NULL); + clk_add_alias(NULL, "0-0021", "video_clk", NULL); /* Register GPIOs for video sources. */ gpiod_add_lookup_table(&ov7725_gpios); diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index 97a65ce..f939e28 100644 --- a/drivers/media/i2c/ov772x.c +++ b/drivers/media/i2c/ov772x.c @@ -1300,7 +1300,7 @@ static int ov772x_probe(struct i2c_client *client, if (priv->hdl.error) return priv->hdl.error; - priv->clk = clk_get(&client->dev, "xclk"); + priv->clk = clk_get(&client->dev, NULL); if (IS_ERR(priv->clk)) { dev_err(&client->dev, "Unable to get xclk clock\n"); ret = PTR_ERR(priv->clk);