Message ID | 20230208113348.16880-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3407532wrn; Wed, 8 Feb 2023 03:50:28 -0800 (PST) X-Google-Smtp-Source: AK7set/YkUKrsY0jrwqmj31bnvY3mqV37Du39tdMqQ4nZhiY62t0QFpiMt6nfVBS9XJQt6AVCjOz X-Received: by 2002:a17:90a:3f17:b0:230:dc97:9da2 with SMTP id l23-20020a17090a3f1700b00230dc979da2mr6309168pjc.1.1675857028358; Wed, 08 Feb 2023 03:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675857028; cv=none; d=google.com; s=arc-20160816; b=Ll+j7/Blp3vp0FjE8wGXsA7SrCyAPPFghBKXeNhiJtGalKpjcl7yufG3ChoFBtGL8j EXOI0SvQEZObL9yNTtYYoUPoSYr+yM3eXaAksCgL9ndpIxjtnbxDSgUIZ4CVChSyIALL 2AJiv7nKilOAxvq7SLwn5h3WF211A8OusG5XDdAvJwObRuLhGaXdr763ZKZ8zEvH7L99 6htvKxq5JVOXGAm7DeG63Ve1oCMcIUbIExGDJshBkgNC+ZmdmbdowPxj5y0mo0Awx/CH 4snPbooKKQc0aQLx7+iko/33+ohCnMTChSbT7lA1xcVavzyahojPoR2RhASzuKlzsLy3 90nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3yRslopLfsieJs2ztPS5L1Pvg+WZPeOGc57wNbJYr28=; b=L3BJK7kVK+ONAWggK3Mxn3LB9bhbGzGAONdfr1r9M/XSGJDdfTISJ9kICMsgWp6wf7 kqbxn1+5zeguibglK8f/BadRxiQvQmqYzfCKSmvgfQ2EifPuEttphjlmVvvXgDR98lFM 9aLrVdN6UFDLQXbuzQlVZlDBD3QWaL/tsOQRzng1F7H4nmb+HE91CLRH983EHFNojbGQ MutFFdMa3Egk8laZTG9VQpaUhA8AZEKHOxacc3vFEhP4KvznAq8EqTivJjO3i4h6Xc0V tM0pksYr5LFu1lMLyMCF+tKXL3hz0XzwvE/y2iV+BSlJrGm5QNoiKLtq1VEb1DsvChdW L7wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FYna69kP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r6-20020a17090a438600b00230e4f7bb73si1306408pjg.148.2023.02.08.03.50.11; Wed, 08 Feb 2023 03:50:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FYna69kP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231179AbjBHLdQ (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Wed, 8 Feb 2023 06:33:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbjBHLdP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Feb 2023 06:33:15 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6782C3A5A5; Wed, 8 Feb 2023 03:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675855994; x=1707391994; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6QWobExJUgNiPIpPcBCb2eizDi1d8apfdQb0A0ZA4ao=; b=FYna69kPiAl6+MDl/aVA7clizfxl94MZZytdBZuNHKriPLGjXcYUmhEu Zb1HYMiMRGVpEnofwxE8IdQYPtbisfWER8TxwkQMtG9GoQhCBTlosZ6cq bP4vk+5UnJL/bQZph2O4doMDn+OLTjj8UXsxtj6Qy4PnZBpU0xhgq2UnD 37NcsSXWR7orHNxkETR3g6ljIMl7hcrDfyVF4TLE3rJM0UQI+/aI+GdkN FAVdeVtFyMJrV8SCV14QoN1aU14boqhQJlKShq8iXyLulnIyXu+zF21SQ FshJSY+29Yw5aJjJx/9O1wo+bmASa5lNwPMzDiYgWx7gdt6pcrKt2fYdQ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="394365329" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="394365329" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 03:33:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="735910066" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="735910066" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 08 Feb 2023 03:33:11 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A97FD1F8; Wed, 8 Feb 2023 13:33:49 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Sakari Ailus <sakari.ailus@linux.intel.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Alexander Stein <alexander.stein@ew.tq-group.com>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Manivannan Sadhasivam <mani@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Subject: [PATCH v1 1/1] media: i2c: imx290: Use device_property_read_u32() directly Date: Wed, 8 Feb 2023 13:33:48 +0200 Message-Id: <20230208113348.16880-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757263459427686273?= X-GMAIL-MSGID: =?utf-8?q?1757263459427686273?= |
Series |
[v1,1/1] media: i2c: imx290: Use device_property_read_u32() directly
|
|
Commit Message
Andy Shevchenko
Feb. 8, 2023, 11:33 a.m. UTC
No need to call fwnode_property_read_u32(dev_fwnode()), when
we have already existing helper. So use it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/media/i2c/imx290.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi Andy, Thank you for the patch. On Wed, Feb 08, 2023 at 01:33:48PM +0200, Andy Shevchenko wrote: > No need to call fwnode_property_read_u32(dev_fwnode()), when > we have already existing helper. So use it. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/media/i2c/imx290.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c > index 330098a0772d..e7aa2ecdcc88 100644 > --- a/drivers/media/i2c/imx290.c > +++ b/drivers/media/i2c/imx290.c > @@ -1137,8 +1137,7 @@ static int imx290_init_clk(struct imx290 *imx290) > u32 xclk_freq; > int ret; > > - ret = fwnode_property_read_u32(dev_fwnode(imx290->dev), > - "clock-frequency", &xclk_freq); > + ret = device_property_read_u32(imx290->dev, "clock-frequency", &xclk_freq); I'd break the line here. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > if (ret) { > dev_err(imx290->dev, "Could not get xclk frequency\n"); > return ret;
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index 330098a0772d..e7aa2ecdcc88 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -1137,8 +1137,7 @@ static int imx290_init_clk(struct imx290 *imx290) u32 xclk_freq; int ret; - ret = fwnode_property_read_u32(dev_fwnode(imx290->dev), - "clock-frequency", &xclk_freq); + ret = device_property_read_u32(imx290->dev, "clock-frequency", &xclk_freq); if (ret) { dev_err(imx290->dev, "Could not get xclk frequency\n"); return ret;