diff options
author | Ben Dooks <ben.dooks@sifive.com> | 2022-12-23 15:38:13 +0000 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2023-02-20 12:26:04 +0100 |
commit | f7c843d6d7f82d26ee9efe689f9b3208dbf7ed87 (patch) | |
tree | 6d235a08128199947b0743d68e87c330ab75172b /drivers/pwm | |
parent | 0f03bf300833c05d914ab7f5ab3d8bc8564e9912 (diff) | |
download | lwn-f7c843d6d7f82d26ee9efe689f9b3208dbf7ed87.tar.gz lwn-f7c843d6d7f82d26ee9efe689f9b3208dbf7ed87.zip |
pwm: dwc: Change &pci->dev to dev in probe
The dwc_pwm_probe() assigns dev to be &pci->dev but then uses &pci->dev
throughout the function. Change these all to the 'dev' variable to make
lines shorter.
Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-dwc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index bd2308812096..de1c497d5b48 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -204,14 +204,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; } @@ -219,14 +218,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; } |