From patchwork Fri Aug 30 07:17:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 11123071 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2431616B1 for ; Fri, 30 Aug 2019 07:18:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00938233FF for ; Fri, 30 Aug 2019 07:17:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="R7HX5N+q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728407AbfH3HR5 (ORCPT ); Fri, 30 Aug 2019 03:17:57 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44000 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728317AbfH3HR4 (ORCPT ); Fri, 30 Aug 2019 03:17:56 -0400 Received: by mail-wr1-f67.google.com with SMTP id y8so5834214wrn.10 for ; Fri, 30 Aug 2019 00:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=87c9Esbfhh1R2CT+KoDKwWm3ER/ccLkcscNPwZrMjvE=; b=R7HX5N+qO9vul75lMvB80HkCVNqQlDuX+3sQTg4/wUtSilf0t0cU3lXyFVXSdxCA9B HYhU0DvmZFYIPgpH+LmEDudVksUAFBfr6wXeADadDOp570/DK9axKXUwBd3vbT9v80Dk XGyF1ZN+bt+lsB2GFHRy4pYIlS7XZs9vCJkeaJqy4wCY2jbBwYOo31Y7LPQ90yo4yM2i OBQP0rbdOJ4W8S0fXp2NjaTGqsS6Ttjzc59uMLbbaK9mPms9epAedIy6UY7mj3y1lCiz 0qQoA4T6IBazuJzmsosABPD4Z0tMcn2Lf/swKTxZQ2IARZgDkhe2sMCykSc4yetjSza2 UBzg== 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:mime-version:content-transfer-encoding; bh=87c9Esbfhh1R2CT+KoDKwWm3ER/ccLkcscNPwZrMjvE=; b=XDKJEfOdQrOCW1tTk66gf2vgFqULlRDu6/PHWl7Wl5UIZGroAbgfd/6QKRhuxWodRF oRfe66lZAUhqRlLXqV3MbzJs82ADds6LnZnJmiJ5p6zc8dykr5rgyCWUVcmBGBz7Pd9w 6pT4tgbVWorkwuJF0JDnte9c9jDvViEsAETT0z/q018uZG/v10aNx3MOE6Mg1XoD9MYM mNN+g3TDY78ZDsX0KB3061XL3NsfYUG22nPuoxoIRXw5/c+JjJhcS93pKDNFNfmPkIE6 kX92gDZCYSi40FZALCiHDom2W3MlSd9HWRvGdswUAPERlNChL09oTTwPVTng6JrN4VTd ug+A== X-Gm-Message-State: APjAAAWY+gBDwhQ4Nea/et2/TX3OJLNMqRF/Bu6TFNT6BoRk3SRRQRE+ jbSJSw+nC7O7KxmCIkIcSVrxrw== X-Google-Smtp-Source: APXvYqzkzj4fi+gUVRl8oN9nzpOF8I9mEfKO8sWi5cRqKen8+QKhDkcYwUYXisXPkTCXXjklEYKC+Q== X-Received: by 2002:a5d:63d0:: with SMTP id c16mr12188620wrw.22.1567149474440; Fri, 30 Aug 2019 00:17:54 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id x6sm7637529wrt.63.2019.08.30.00.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 00:17:53 -0700 (PDT) From: Bartosz Golaszewski To: Jens Axboe , Thierry Reding , Jonathan Hunter , JC Kuo , Kishon Vijay Abraham I , Liam Girdwood , Mark Brown , Mathias Nyman , Greg Kroah-Hartman Cc: linux-ide@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 4/4] usb: host: xhci-tegra: use regulator_bulk_set_supply_names() Date: Fri, 30 Aug 2019 09:17:40 +0200 Message-Id: <20190830071740.4267-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190830071740.4267-1-brgl@bgdev.pl> References: <20190830071740.4267-1-brgl@bgdev.pl> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Bartosz Golaszewski Use the new regulator helper instead of a for loop. Signed-off-by: Bartosz Golaszewski --- drivers/usb/host/xhci-tegra.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index dafc65911fc0..9ed573bc89aa 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -1128,8 +1128,9 @@ static int tegra_xusb_probe(struct platform_device *pdev) goto put_powerdomains; } - for (i = 0; i < tegra->soc->num_supplies; i++) - tegra->supplies[i].supply = tegra->soc->supply_names[i]; + regulator_bulk_set_supply_names(tegra->supplies, + tegra->soc->supply_names, + tegra->soc->num_supplies); err = devm_regulator_bulk_get(&pdev->dev, tegra->soc->num_supplies, tegra->supplies);