projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f71635e
)
drm/gma500: Disable PCI device during shutdown
author
Thomas Zimmermann
<tzimmermann@suse.de>
Mon, 20 Sep 2021 14:10:48 +0000
(16:10 +0200)
committer
Thomas Zimmermann
<tzimmermann@suse.de>
Thu, 23 Sep 2021 07:40:36 +0000
(09:40 +0200)
Use managed disablement of PCI devices via pcim_device_enable().
Disables the PCI device and simplifies error rollback in probe
function.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-3-tzimmermann@suse.de
drivers/gpu/drm/gma500/psb_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/gma500/psb_drv.c
b/drivers/gpu/drm/gma500/psb_drv.c
index
05f42e6
..
80ef2f0
100644
(file)
--- a/
drivers/gpu/drm/gma500/psb_drv.c
+++ b/
drivers/gpu/drm/gma500/psb_drv.c
@@
-448,15
+448,13
@@
static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct drm_device *dev;
int ret;
- ret = pci_enable_device(pdev);
+ ret = pci
m
_enable_device(pdev);
if (ret)
return ret;
dev = drm_dev_alloc(&driver, &pdev->dev);
- if (IS_ERR(dev)) {
- ret = PTR_ERR(dev);
- goto err_pci_disable_device;
- }
+ if (IS_ERR(dev))
+ return PTR_ERR(dev);
pci_set_drvdata(pdev, dev);
@@
-474,8
+472,6
@@
err_psb_driver_unload:
psb_driver_unload(dev);
err_drm_dev_put:
drm_dev_put(dev);
-err_pci_disable_device:
- pci_disable_device(pdev);
return ret;
}