From patchwork Sun Apr 29 17:13:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10370615 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 24B2C60116 for ; Sun, 29 Apr 2018 17:14:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1425A28A18 for ; Sun, 29 Apr 2018 17:14:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07C9928A21; Sun, 29 Apr 2018 17:14:00 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 9B73B28A18 for ; Sun, 29 Apr 2018 17:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754025AbeD2RN5 (ORCPT ); Sun, 29 Apr 2018 13:13:57 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38493 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753963AbeD2RNx (ORCPT ); Sun, 29 Apr 2018 13:13:53 -0400 Received: by mail-pg0-f65.google.com with SMTP id n9-v6so4805303pgq.5; Sun, 29 Apr 2018 10:13:53 -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=Lj44UhjTFcqpb5wCoziKxWcINOJz1H/2EPXftxL69ic=; b=S8kD9/mKh3QsHKC0Gnz+OSVk4cK8qwQGZ43XONnaerBycDtQbEwJg9/7AqADfsCsBF gy/189+VKy3ZDNaoXheB5LARsjnz9QCzTHkzH+jZCV6M7i4wkCWh80Xd906cSmM4KSBY jeetjGqanLbjFENT6LSc7Rz+OIVrlXtctU6KTKfKysxpRnSboLfDPDKPugM9UKtmO5rE EzMLwhi/YCDi01ckLGINytUaNJAa7cE1RwWdPNmzqVv/3BrbtwTaOAmasGPL9twRxcey 3jAUL8I+I8oQULB44ReGVCEyAvsd0dOFycsDekq+dpLTHVqrcP86FyBic2KzFx8gmXIN PZ1w== 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=Lj44UhjTFcqpb5wCoziKxWcINOJz1H/2EPXftxL69ic=; b=noBnVYmqDVBf5TS6n9wNxm5smHueLqO7vKfzi0pxuF7xofBViuUmAIJmbzowtXK8J5 QYulkauwUKLu8ECBXt6Gt4Q6lAohhVUFXl5PC/JYfPMRrqS+WpuiWL/yPXz24rIaCPH7 /dSed34gAQF/B2YAgWXphjfZ6k/02YsHDuM3IyHZIiAyj3D9BHR691eKd/yeYiPvHjr/ lAT7qgaZ59R5KGZs1oXkQm2KnGIPvNswxxEDE7zwKytEXBikylhzg9cpDucoN7gPf/Fq EuzJAs1XpXEgftPS08ps1I7Rgvb+Ald2JW38uFl0+inITJRKFmo2eG/AavdsoQqo0jU8 eAoA== X-Gm-Message-State: ALQs6tDrQt37FzUtxmVJ+jFnochlFrdQMTy44p69+bAlqQJMqyGNc31U fCJ5xEf9nE1jbJ1S+x+lHlfnLA== X-Google-Smtp-Source: AB8JxZqyxnVfDZ8DgChaNv/4YgJURwNMlzDAQFW8W0wiry5vH1hLbbY4J7dnrCuEPIVhGJnBLL2hxA== X-Received: by 2002:a65:534d:: with SMTP id w13-v6mr8112404pgr.429.1525022032817; Sun, 29 Apr 2018 10:13:52 -0700 (PDT) Received: from localhost.localdomain ([240f:4:c2bc:1:754e:5a21:c35f:52a1]) by smtp.gmail.com with ESMTPSA id e10sm10168022pfn.67.2018.04.29.10.13.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Apr 2018 10:13:52 -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 v4 07/14] media: ov772x: omit consumer ID when getting clock reference Date: Mon, 30 Apr 2018 02:13:06 +0900 Message-Id: <1525021993-17789-8-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525021993-17789-1-git-send-email-akinobu.mita@gmail.com> References: <1525021993-17789-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 --- * v4 - New patch 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);