From patchwork Fri Aug 30 07:17:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 11123079 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 86DAC16B1 for ; Fri, 30 Aug 2019 07:18:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64344233FF for ; Fri, 30 Aug 2019 07:18:11 +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="WAQJlbmk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727854AbfH3HSK (ORCPT ); Fri, 30 Aug 2019 03:18:10 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:37174 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727960AbfH3HRy (ORCPT ); Fri, 30 Aug 2019 03:17:54 -0400 Received: by mail-wr1-f66.google.com with SMTP id z11so5866139wrt.4 for ; Fri, 30 Aug 2019 00:17:52 -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=vb7GxMox8GW4icSo2qX00cFQWvHnLzZGW13vcUTShQE=; b=WAQJlbmkmnmIuVhxCeqPrEzfqnlpYvSOrdixOe4Z9156CTPal3tG1hwcQWWy+Z21tL mOiGmwjw5LfRU3lcXsunSl/jw76qkKc8yp1t1pSN/VD7DVAk4t5iQ9U8DBlJUmITUM9d 2IxSHXLkycIF4k4hvH7PpYZlk+hhcgYSq5dtVERzmteYgGQlVN4d42mVn2UycezdGQMY sT9SipL7OZNffBIsqlS2BNojmLw2NFwsp6wHNFmpjYD5irxXIIEnoQ8PciwfpbL6F7SI /+ST61Q9PN6QhC7fIe/EyYjna6ppzVFEAoOClugrYP3bXmY1AVjOMWPK8HviQt2kClP1 iDsg== 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=vb7GxMox8GW4icSo2qX00cFQWvHnLzZGW13vcUTShQE=; b=tO1gdlFTT1ao94JCl4VayIAvh5b8weHjG89kUlS8e6lq22ZFiLE3BMdKqjRurmbk3X tlpprNOIn8jbUw8/KHMnQ5NQc+90nKHoGszg8cMTcRisBxsbHY4i+DBtt4NZ54OMS0D0 5HjycKw4hDhcC/YLZIcvow2ERLbdPzgUwahJNU+TfbGUfaRCZnOT8pWB94rz13l9JUZ9 UTS9o4hlRRqabCXJxyGsYbozbF67/CcmCg8vMp2rPcIQzg33ei+FSay6APy0vlqnBiWS w2yGoLokgN0X3aDclGvpX4NPijZkXW31GksWYUG4J8ATqzS6pCgATWYvF7LPavUqdezr Pr+w== X-Gm-Message-State: APjAAAUFfFAiPk7OT/K1tJqVauoMCMrMaBM/xHZdaGuQsDSNyua5ms0x MguYwKo59/+JqP87KJ5gT+v2Pg== X-Google-Smtp-Source: APXvYqxIInMCzWNf34LxcyxSnQVs/J+xN1iNdetlgr35rdEBD2cxk1bJXmhlgRog97aovvym4oXZLQ== X-Received: by 2002:a5d:4950:: with SMTP id r16mr16210331wrs.347.1567149472173; Fri, 30 Aug 2019 00:17:52 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 00:17:51 -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 2/4] ahci: tegra: use regulator_bulk_set_supply_names() Date: Fri, 30 Aug 2019 09:17:38 +0200 Message-Id: <20190830071740.4267-3-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/ata/ahci_tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c index e3163dae5e85..cb55ebc1725b 100644 --- a/drivers/ata/ahci_tegra.c +++ b/drivers/ata/ahci_tegra.c @@ -483,7 +483,6 @@ static int tegra_ahci_probe(struct platform_device *pdev) struct tegra_ahci_priv *tegra; struct resource *res; int ret; - unsigned int i; hpriv = ahci_platform_get_resources(pdev, 0); if (IS_ERR(hpriv)) @@ -543,8 +542,9 @@ static int tegra_ahci_probe(struct platform_device *pdev) if (!tegra->supplies) return -ENOMEM; - 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); ret = devm_regulator_bulk_get(&pdev->dev, tegra->soc->num_supplies,