From patchwork Tue Jul 23 19:47:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11055247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 086B8746 for ; Tue, 23 Jul 2019 19:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9AE628668 for ; Tue, 23 Jul 2019 19:47:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDF3D28718; Tue, 23 Jul 2019 19:47:30 +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=-7.9 required=2.0 tests=BAYES_00,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 72DDC28668 for ; Tue, 23 Jul 2019 19:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391731AbfGWTr3 (ORCPT ); Tue, 23 Jul 2019 15:47:29 -0400 Received: from mga01.intel.com ([192.55.52.88]:17494 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730232AbfGWTr3 (ORCPT ); Tue, 23 Jul 2019 15:47:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 12:47:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,300,1559545200"; d="scan'208";a="253332228" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 23 Jul 2019 12:47:27 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1235781; Tue, 23 Jul 2019 22:47:26 +0300 (EEST) From: Andy Shevchenko To: Heikki Krogerus , linux-usb@vger.kernel.org, Greg Kroah-Hartman Cc: Andy Shevchenko Subject: [PATCH v1] usb: typec: mux: Switch to use fwnode_property_count_uXX() Date: Tue, 23 Jul 2019 22:47:26 +0300 Message-Id: <20190723194726.69545-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use fwnode_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko Acked-by: Heikki Krogerus --- drivers/usb/typec/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c index 61b7bc58dd81..57907f26f681 100644 --- a/drivers/usb/typec/mux.c +++ b/drivers/usb/typec/mux.c @@ -215,7 +215,7 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data) } /* Alternate Mode muxes */ - nval = fwnode_property_read_u16_array(con->fwnode, "svid", NULL, 0); + nval = fwnode_property_count_u16(con->fwnode, "svid"); if (nval <= 0) return NULL;