From patchwork Fri Dec 23 15:38:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 636749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B151C4167B for ; Fri, 23 Dec 2022 15:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236241AbiLWPi3 (ORCPT ); Fri, 23 Dec 2022 10:38:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236376AbiLWPi2 (ORCPT ); Fri, 23 Dec 2022 10:38:28 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B54537F9A for ; Fri, 23 Dec 2022 07:38:27 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id i7so4890199wrv.8 for ; Fri, 23 Dec 2022 07:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BEOpRioXienSDDf6vjruAkPlsDKDhUNbn1dmZioZ4X4=; b=OyISZS7Qk9t7+FnnDQ85qmPH7Q4kMXOvDS6K7Si+TuKJPmpWpRQD9zlJpYs7Cer2qJ ZFWrUq5ffQhuCEUDwNmKHeBVDFGgUnAJ3dzhKehZSCDEVNgEFAyhMbh6uxEmibNX69xh mL/SAQxcGmilpqWniAHf9b1v2Xw1bnW2pFHaprzQJCJxiEWePQ2LxYfvvR2LeKQsaFkY mci5j1/yweXaePewHVd19jqt1Bq5eipQDJxL8YroiK1WCEYdfYOIRIcOdttunVCQeGmA QHQgusV1tfMJzNFsF/gjdUv1k5m/hKln05peunk2G4Cao2iESlgYVIJorK6C5Axh5U4H ilWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BEOpRioXienSDDf6vjruAkPlsDKDhUNbn1dmZioZ4X4=; b=P3PNIBfbErBI+4HBj0zARhWsqDITUSEAaEVJQv3VFMTdyDKFPdQMuBoEETUx6WAk5T y4ibzwoIyrWWTDrrD538hd7eOjS18b7fnC49yCZ5bEkufYrNItyP7NAYyhMY0B5zJ0ts j1v1nyCAJ11rCSLXRDPSKiQ6pvcBlNETjjPCdqDM9ehLv5xSn2xQWNtRcTICW/76Gk+z w+FQLtDOVX9v0R9c/9niONu1DnH9f1PPyoCcLkzB/ht2+PHbeORRND+divIAKbdRMeko xxskBnunKJX88oAwLntmd7e4/s+BNkOmzBu8Q/5OSWVJyV0YExdm+87d1Zbzb3hG8VQc ZmXw== X-Gm-Message-State: AFqh2kp3OwqUqlkHKCq8T76xat1pytV0x1lDQ3srkf6hSMJdIMYhA4Zr LXHhbK9ZfYx+Gi9lNrf3XKtJyQ== X-Google-Smtp-Source: AMrXdXsl7Njmrz2HYWu9DnqOVotNnuXsBsoN/PpROwbmBBrYuoixwTtK3o4Evy3tC4SOmiVxOgXKtg== X-Received: by 2002:a5d:5d8a:0:b0:274:fae4:a518 with SMTP id ci10-20020a5d5d8a000000b00274fae4a518mr1697816wrb.11.1671809906235; Fri, 23 Dec 2022 07:38:26 -0800 (PST) Received: from rainbowdash.. (cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net. [86.15.83.122]) by smtp.gmail.com with ESMTPSA id m5-20020adfc585000000b00236488f62d6sm3491610wrg.79.2022.12.23.07.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 07:38:25 -0800 (PST) From: Ben Dooks To: linux-pwm@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , u.kleine-koenig@pengutronix.de, Thierry Reding , Krzysztof Kozlowski , Greentime Hu , jarkko.nikula@linux.intel.com, William Salmon , Jude Onyenegecha , Ben Dooks Subject: [PATCH v7 03/10] pwm: dwc: change &pci->dev to dev in probe Date: Fri, 23 Dec 2022 15:38:13 +0000 Message-Id: <20221223153820.404565-4-ben.dooks@sifive.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221223153820.404565-1-ben.dooks@sifive.com> References: <20221223153820.404565-1-ben.dooks@sifive.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The dwc_pwm_probe() assignes dev to be &pci->dev but then uses &pci->dev throughout the function. Change these all to the be 'dev' variable to make lines shorter. Signed-off-by: Ben Dooks Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-dwc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index 7568300bb11e..c706ef9a7ba1 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -202,14 +202,13 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id) struct dwc_pwm *dwc; int ret; - dwc = devm_kzalloc(&pci->dev, sizeof(*dwc), GFP_KERNEL); + dwc = devm_kzalloc(dev, sizeof(*dwc), GFP_KERNEL); if (!dwc) return -ENOMEM; ret = pcim_enable_device(pci); if (ret) { - dev_err(&pci->dev, - "Failed to enable device (%pe)\n", ERR_PTR(ret)); + dev_err(dev, "Failed to enable device (%pe)\n", ERR_PTR(ret)); return ret; } @@ -217,14 +216,13 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id) ret = pcim_iomap_regions(pci, BIT(0), pci_name(pci)); if (ret) { - dev_err(&pci->dev, - "Failed to iomap PCI BAR (%pe)\n", ERR_PTR(ret)); + dev_err(dev, "Failed to iomap PCI BAR (%pe)\n", ERR_PTR(ret)); return ret; } dwc->base = pcim_iomap_table(pci)[0]; if (!dwc->base) { - dev_err(&pci->dev, "Base address missing\n"); + dev_err(dev, "Base address missing\n"); return -ENOMEM; }