From patchwork Tue May 31 13:53:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12865733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45595C433EF for ; Tue, 31 May 2022 13:54:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345386AbiEaNyl (ORCPT ); Tue, 31 May 2022 09:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345409AbiEaNya (ORCPT ); Tue, 31 May 2022 09:54:30 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 711298FFB0; Tue, 31 May 2022 06:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654005208; x=1685541208; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LltwEzJ1PPFMhj2wpaN+6JtJMLZwcYWN9NWBcvqkjy4=; b=dMg6MVArOvTNpo8VRXhLAUJylq1uQwQIMcv5k2tc3vLLTWxXo6NOksuu +rpKpJ00pvFkdRhbUvpCV1p82lwNNyIEDNIge2X9dYmBLQuLTVx5F7Ei+ F4Ij3slX2BjTdWdgXZqOLT96Jk1pV/GbvDRnzWHs7pga/RNJkm/CxKQcs ABzopF7/MEl9HvFDKcDh6ayGtlg1G2G6E/Y6i/JUd7FAr8VGlMa18nP7N FBQrIhXqvjIbzzjbQ18XR54GZ3V8zSRC8Z62LFGVrHHrky0dJ8wXUUlh/ GTeYBLEW/Qn4AQkOJtwf7f1CU6JoDct/3DeGABOdYpyEtYoXgjvURxofc Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="335916866" X-IronPort-AV: E=Sophos;i="5.91,265,1647327600"; d="scan'208";a="335916866" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 06:53:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,265,1647327600"; d="scan'208";a="666927157" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 31 May 2022 06:53:18 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 03F081AA; Tue, 31 May 2022 16:53:20 +0300 (EEST) From: Andy Shevchenko To: Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Andy Shevchenko Subject: [PATCH v1 1/1] iio: dac: ad5592r: Get rid of OF specifics Date: Tue, 31 May 2022 16:53:20 +0300 Message-Id: <20220531135320.63096-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Use dev_fwnode() instead of direct OF node dereference when checking for regulator API error code. Signed-off-by: Andy Shevchenko --- drivers/iio/dac/ad5592r-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c index 4434c1b2a322..7a9b5fc1e579 100644 --- a/drivers/iio/dac/ad5592r-base.c +++ b/drivers/iio/dac/ad5592r-base.c @@ -603,7 +603,7 @@ int ad5592r_probe(struct device *dev, const char *name, st->reg = devm_regulator_get_optional(dev, "vref"); if (IS_ERR(st->reg)) { - if ((PTR_ERR(st->reg) != -ENODEV) && dev->of_node) + if ((PTR_ERR(st->reg) != -ENODEV) && dev_fwnode(dev)) return PTR_ERR(st->reg); st->reg = NULL;