Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8952699ybi; Tue, 23 Jul 2019 18:47:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqwV1HArgB6ZCGayi7onAulbL9Duc9o0k3HynFy6VPQHMVaqTYPWtZ/eIkSqEVG5g5Gath X-Received: by 2002:aa7:8b55:: with SMTP id i21mr8710322pfd.155.1563932839445; Tue, 23 Jul 2019 18:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563932839; cv=none; d=google.com; s=arc-20160816; b=pWM/iHDrduS3FEOHvRmSLjRWoeqYU1O0RddXzhBHeEK9L2PTaGkx6YMbza2XYUVQlm Bze69taIkW8Q4d94is0lyO4O92hc38WMFaWSx74/dFTjUKm2uf2jRHF/ZtQgc/dVLgZl 8pnKrPSSwQ9T8X8fV0RTtA4NP1ovFQ5U920tvqT5NQycvJxfhtI12384YX3ZTjUC9vr0 mHZBacI9oD9Wh1ZN+nkOyjz9b9u2/itDm0Ewr9VcYMgPbExW+Bpinj5ylVzR7GfmZXsK K+8gbipT4sUAFb/TFpTH2PXAEtKhl1ZkdSnFTdTrei+p1q9kZaPMP+lflZRyi5ihAK/e JWGQ== 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 :message-id:date:subject:cc:to:from; bh=isYuixirm6x2OWegh8XmcxjvmYZVGDrIpDH0rQJTaSo=; b=DVE4U6wB7IbA/NIFFPvZOhps/4aHXSRxWzETvLw5+QdAyuujwrnq/AAkVudsI8cSwR W4R36R9YWCMIPPto9XGogVM7c14Xzg2m1zUP2mzM11klUR/gXBJtp0E8p2QmY6GFmnM/ T75m0kDwIzzMEzWysX+ie23e5Z+oY9YfYTTrpyu4YPQruluRIV8sokUN3lOGlRDQwh2n 3W/tJejscAcinj5qIwgD8BLNBwZHYTYjG19MLZgtrk+7QYxYu2Odb2kWhJsOdEvmRIqz JtObtwJpZz9J2YYVx8/7Un3xtMFsMfCoJa1Ef4+/F8SUl/E2pU+h+CLtyRf7Bum9lBrW g42g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si13661114pla.80.2019.07.23.18.47.03; Tue, 23 Jul 2019 18:47:19 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391154AbfGWRkZ (ORCPT + 99 others); Tue, 23 Jul 2019 13:40:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:57719 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388606AbfGWRkZ (ORCPT ); Tue, 23 Jul 2019 13:40:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 10:40:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,299,1559545200"; d="scan'208";a="163566590" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga008.jf.intel.com with ESMTP; 23 Jul 2019 10:40:22 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1A32681; Tue, 23 Jul 2019 20:40:21 +0300 (EEST) From: Andy Shevchenko To: MyungJoo Ham , Chanwoo Choi , linux-kernel@vger.kernel.org, Charles Keepax Cc: Andy Shevchenko Subject: [PATCH v1] extcon: arizona: Switch to use device_property_count_u32() Date: Tue, 23 Jul 2019 20:40:21 +0300 Message-Id: <20190723174021.66718-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use use device_property_count_u32() directly, that makes code neater. Signed-off-by: Andy Shevchenko --- drivers/extcon/extcon-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 7e9f4c9ee87d..e970134c95fa 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1253,7 +1253,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev, int i, j; u32 *vals; - nconfs = device_property_read_u32_array(arizona->dev, prop, NULL, 0); + nconfs = device_property_count_u32(arizona->dev, prop); if (nconfs <= 0) return 0; -- 2.20.1