From patchwork Tue Oct 1 13:23:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 11168791 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 8C29614DB for ; Tue, 1 Oct 2019 13:24:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69E5520815 for ; Tue, 1 Oct 2019 13:24:03 +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="tBSkEVcs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388297AbfJANXr (ORCPT ); Tue, 1 Oct 2019 09:23:47 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53464 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388290AbfJANXr (ORCPT ); Tue, 1 Oct 2019 09:23:47 -0400 Received: by mail-wm1-f66.google.com with SMTP id i16so3380640wmd.3 for ; Tue, 01 Oct 2019 06:23:45 -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=xHg72LNjCpgWpTQNdjLMrLB1+jZKsE9cWHPET5xMEc4=; b=tBSkEVcsW6oFX/En1CD0+X90T8EZ2yuruEKZS2svB/OqS6t266RUlcVeUtyOGhPvPe CJBZ5YaWz6x/uZzh58KAL9T/L+YxCeD+ZjU4rd4WEYonqle0AV3rIinnqU2OBuEcp0QW 0BaMt55o+J0mC+/+/MfJkE64V4hlMArfxvBl+Gkw2aVMjE/kvbERBqcAyCkjYGTEijVr w1/y0xICSXsVSo/otMvM969/3rfmBpN9V0VJPI/KD3dMP3Xvxt0hZGH/4DVrnSuTCz30 5DGBlmsdmPI4vedlC0DWDgC/tjMG0TpnXA3UCWxiGPym5EiVHzsnO3nzbDHCEWFg5V5U 6k/g== 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=xHg72LNjCpgWpTQNdjLMrLB1+jZKsE9cWHPET5xMEc4=; b=HWDGB++MddnlapkLJ9p+NbGACr8+/MoB+Z1wAAlMrq8TRoT/uMr0SJxtNDZBndRdHQ KgZ3QJ3qGB4q+c7CnizkczC7MqISmWf0xIpbXGQCRx+GGVVIDTwKYH7KJz0Gu3H/mx3B K3JYQ5LLFr7Cx5WUg7EqlvNoxu+5MnyJGMhEVzhkbc61GCtw9PTxVJQO90yskyzV8s7+ Ele5XS0lDlRVWsl15JVeEalKDHFtjrtEXbNbrN16L+y7QH/a2ye/52mS5eLAlkoWKZT0 HWsRMWLpfjqGIYRwJBfYzRBkhnqVDX27scrQnneOQFWuM0wdBEi0R2M5SiiyvKR44P9a 3PcA== X-Gm-Message-State: APjAAAUQIUkHb47P2icZkbMtIx6K4EOj19WZGaSybFzx4E2yD24oBstT 0gyhznzd7jn/njTdpthyZyn1EQ== X-Google-Smtp-Source: APXvYqzdDFS+yo16VHfh45jtAQUaOFj5qTHmjpTnTyXMTwrt6M9CMkxbZDgrJlNyRNEpgNw/dOm9HA== X-Received: by 2002:a7b:cd99:: with SMTP id y25mr3756001wmj.152.1569936224974; Tue, 01 Oct 2019 06:23:44 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id o22sm41847990wra.96.2019.10.01.06.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 06:23:44 -0700 (PDT) From: Bartosz Golaszewski To: Jens Axboe , Thierry Reding , Jonathan Hunter , JC Kuo , Kishon Vijay Abraham I , 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 1/3] ahci: tegra: use regulator_bulk_set_supply_names() Date: Tue, 1 Oct 2019 15:23:31 +0200 Message-Id: <20191001132333.20146-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191001132333.20146-1-brgl@bgdev.pl> References: <20191001132333.20146-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 Acked-by: Thierry Reding --- 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, From patchwork Tue Oct 1 13:23:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 11168789 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 CE5C51709 for ; Tue, 1 Oct 2019 13:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD55A21A4A for ; Tue, 1 Oct 2019 13:24:00 +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="Qq2uF8Z4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388377AbfJANXw (ORCPT ); Tue, 1 Oct 2019 09:23:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46381 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388363AbfJANXt (ORCPT ); Tue, 1 Oct 2019 09:23:49 -0400 Received: by mail-wr1-f65.google.com with SMTP id o18so15477010wrv.13 for ; Tue, 01 Oct 2019 06:23:46 -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=3UXwphbefxoaNIa3BWF+ZDcJIqlBkv2JNP3hYy5Lkdg=; b=Qq2uF8Z4L27uDSCEXrRA+mqw/EEYd7dJPlm3iWU9fq7yyhv2OXMdvhnqAeWCSfsyMl 2H6I6pT6rRwrA9Qf4jNQduD6NJ6UI1eDWRsgxB0V0buAUaIsX87eFjaLgT1Eaf+62Jx4 HgzBlQ9OnWgK37zKc7e9Ca5v3261eNGhHWdZap5De244frCEJkBY/ORUuGmdcubJBZ3R ohxVyEI+XnfdXiAACAnXCpFB5JDu77LF3PgzPMT/ZnAaKYLNay/eSrEQJ6qC9bCBphcJ BpER6vm+n6G2/0TSUg/h41avtO+8jBEg9cVPqG3plSmJW+qUHUn5KfBrZqBOdPFueBDQ 0zAg== 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=3UXwphbefxoaNIa3BWF+ZDcJIqlBkv2JNP3hYy5Lkdg=; b=FNxGOxiIU1eXVUXfpSzssbh+ct9YuiYuwC1+Ibv23rSIyZyl/5EbAHeydJU3FtIkM6 ugeNvjFj93W/d4welnAaK7wjoqhT7ylUWiJ5YJwUWyvPecHUS5k4qmtO2N0g6kF5FqI4 ddlbXNhUh0qQKYNSdpaN4snrZndk7Ue+t2lW0ZWMlnCvwVFzJqjvQiU1A5C71vy8dGGS 8o8khuoMCXTN7ytBQY1DcuKaBUC6r5iTf8Fhy/SUvGjg+Bc3U6fOwlb3zXuXE4MRRmVB CJOhXEMgKdN3Intjp0T5NoyW7crUUzSXDUt4KIaSpjijfAWxtpTN8Ncgw0AmGwFu1wJu sYcA== X-Gm-Message-State: APjAAAUr8VFYA0oPWkheJquDQRaCeI4C+uM3P7MmJGkWKD0QWyAFdgfV OruxiOJBVLZOEnIQGZA+pEvA/g== X-Google-Smtp-Source: APXvYqwPIVOEtxMwDTuDgBXmP6KdpZSgvSoDSeHMC6aZMZXAjqNPoKCPrhHyDyfQ+hRhwa9Y0StEiA== X-Received: by 2002:adf:f801:: with SMTP id s1mr2138136wrp.293.1569936226128; Tue, 01 Oct 2019 06:23:46 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id o22sm41847990wra.96.2019.10.01.06.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 06:23:45 -0700 (PDT) From: Bartosz Golaszewski To: Jens Axboe , Thierry Reding , Jonathan Hunter , JC Kuo , Kishon Vijay Abraham I , 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/3] phy: tegra: use regulator_bulk_set_supply_names() Date: Tue, 1 Oct 2019 15:23:32 +0200 Message-Id: <20191001132333.20146-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191001132333.20146-1-brgl@bgdev.pl> References: <20191001132333.20146-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 Acked-by: Thierry Reding --- drivers/phy/tegra/xusb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c index 2ea8497af82a..faf1137d1432 100644 --- a/drivers/phy/tegra/xusb.c +++ b/drivers/phy/tegra/xusb.c @@ -862,7 +862,6 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev) struct tegra_xusb_padctl *padctl; const struct of_device_id *match; struct resource *res; - unsigned int i; int err; /* for backwards compatibility with old device trees */ @@ -907,8 +906,9 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev) goto remove; } - for (i = 0; i < padctl->soc->num_supplies; i++) - padctl->supplies[i].supply = padctl->soc->supply_names[i]; + regulator_bulk_set_supply_names(padctl->supplies, + padctl->soc->supply_names, + padctl->soc->num_supplies); err = devm_regulator_bulk_get(&pdev->dev, padctl->soc->num_supplies, padctl->supplies); From patchwork Tue Oct 1 13:23:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 11168787 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 9E7961709 for ; Tue, 1 Oct 2019 13:23:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A88221A4A for ; Tue, 1 Oct 2019 13:23: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="vTcmolbx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388385AbfJANXx (ORCPT ); Tue, 1 Oct 2019 09:23:53 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37674 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388370AbfJANXu (ORCPT ); Tue, 1 Oct 2019 09:23:50 -0400 Received: by mail-wr1-f68.google.com with SMTP id i1so15528518wro.4 for ; Tue, 01 Oct 2019 06:23:47 -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=enYbMbNI4tFIk7gfYa1OWesJ4PjjLcPO1FzeNFaXSzM=; b=vTcmolbxld2vrR7GBYi0Xsk8M5+fVtDX3QP4tJzqLjwwbcqblsuf7qGLNAs9OwaRT4 fjS7a9OpIzlT/xfqgaDRyjf4V5Rit2/DWdoXokRzMW6dW4zsANFi49wKrnVssomj5g9R nFysWpuZglqOsPWLlpJQvoJ243yFYclKXNMEw/ip1V2XbLgMUencpALJ5fcTinL2uWAe ORXbD6zInbcK0k/JSvsshpClya/bFVAGR9cdsHcIvdaTPPcJkDw4gdHUfCYlnTzblJlj 3/yYxsTVd791qJ1nxdZ0+xCdNhd7LrRJVUi+mSxGEpJ7dNJIf4PtfzN/E/y4WRJo9q/I ygDg== 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=enYbMbNI4tFIk7gfYa1OWesJ4PjjLcPO1FzeNFaXSzM=; b=unB7mk0Gyf7GOOJ+M62B4wETlR26+e4Cd2Acp5CE3aadeC6k6Xmb7Sybuqlv7z4Rbr IccgvVLCCX7REWzKJbG1ZfliALnDBXPniIelkPbxXdSpofMJmpJ3z8lyGxxFFhhJ7DcX KZxavwUlkm7RX467NXh7LpcgNUrbgdDubvPJAYFdO+AzMwa4DDruBhauSW75I0TPm7Ui Gh3m5obeWmrdG7tdFmM+mYJTblg+1pmOdMJOL8EFwUHsUxGd3YG2mUMxfWOZ8oFbGJHw cooF2sIeOxj4cig6BuxhfMUeMRc3NWJdfsSvCHHRvsuVX00613lZhnUgFaTC8jaOhmil szSg== X-Gm-Message-State: APjAAAVQWX8kCYztGJGgb7DHEysC8E8CWouYddppxslk1BnjDVr9hpHr skX+GaCkQd6m4RIq8sbGy9yTkw== X-Google-Smtp-Source: APXvYqzXbDDpewlYhp+7ocQHLaIU5HkjVp7oImNZRVgIZgzhGcBONIajVjr8GuK3dQUIsg/AA4n5Kw== X-Received: by 2002:adf:d08b:: with SMTP id y11mr18624076wrh.50.1569936227104; Tue, 01 Oct 2019 06:23:47 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id o22sm41847990wra.96.2019.10.01.06.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 06:23:46 -0700 (PDT) From: Bartosz Golaszewski To: Jens Axboe , Thierry Reding , Jonathan Hunter , JC Kuo , Kishon Vijay Abraham I , 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 3/3] usb: host: xhci-tegra: use regulator_bulk_set_supply_names() Date: Tue, 1 Oct 2019 15:23:33 +0200 Message-Id: <20191001132333.20146-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191001132333.20146-1-brgl@bgdev.pl> References: <20191001132333.20146-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 Acked-by: Thierry Reding --- 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 2ff7c911fbd0..a3c4c9287f9e 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);