xgifb: change obsolete pci_find_device() with pci_get_device().
PATCH 1/1 xgifb: change obsolete pci_find_device() with pci_get_device().
Replaced obsolete pci_find_device() calls with pci_get_device() calls. This is recommended in pci.txt filei in PCI Documentation.
---
drivers/staging/xgifb/XGI_main_26.c +1 -1
@@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_break ; } - pdev =pci_find_device (PCI_VENDOR_ID_SI , nbridge_id, pdev); + pdev =pci_get_device (PCI_VENDOR_ID_SI , nbridge_id, pdev);if (pdev) valid_pdev =1 ; }
Quoted 2 lines · Atul Sowani
Replaced obsolete
pci_find_device()calls withpci_get_device()calls. This is recommended in pci.txt filei in PCI Documentation.
Yes, but you just caused a resource leak :(
drivers/staging/xgifb/XGI_main_26.c XGIfb_query_VGA_config_space(struct xgi_ · line 486
Quoted 12 lines
Signed-off-by Atul Sowani <[email protected]>---
diff -uprNa/drivers/staging/xgifb/XGI_main_26.cb/drivers/staging/xgifb/XGI_main_26.cdrivers/staging/xgifb/XGI_main_26.c +1
-1@@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_break ; } - pdev =pci_find_device (PCI_VENDOR_ID_SI , nbridge_id, pdev); + pdev =pci_get_device (PCI_VENDOR_ID_SI , nbridge_id, pdev);
Please read the documentation for pci_get_device() for the fact that you now have a reference to the pci device. You need to properly drop it when finished.
Please change this patch to do that properly and I will be glad to apply it.
thanks,
greg k-h
Atul Sowani <[email protected]> writes:
Hi,
Quoted 9 lines
Replaced obsolete
pci_find_device()calls withpci_get_device()calls. This is recommended in pci.txt filei in PCI Documentation.Signed-off-by Atul Sowani <[email protected]>---
diff -uprNa/drivers/staging/xgifb/XGI_main_26.cb/drivers/staging/xgifb/XGI_main_26.c
drivers/staging/xgifb/XGI_main_26.c XGIfb_query_VGA_config_space(struct xgi_ · line 488
Quoted 7 lines
drivers/staging/xgifb/XGI_main_26.c +1
-1@@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_break ; } - pdev =pci_find_device (PCI_VENDOR_ID_SI , nbridge_id, pdev); + pdev =pci_get_device (PCI_VENDOR_ID_SI , nbridge_id, pdev);if (pdev) valid_pdev =1 ;
hmm... I guess that a pci_dev_put() call is lacking if it has been found.
Arnaud
Quoted 15 lines · Arnaud Patard
Atul Sowani <[email protected]> writes:
Hi,Quoted 12 lines
Replaced obsolete
pci_find_device()calls withpci_get_device()calls. This is recommended in pci.txt filei in PCI Documentation.Signed-off-by Atul Sowani <[email protected]>---
diff -uprNa/drivers/staging/xgifb/XGI_main_26.cb/drivers/staging/xgifb/XGI_main_26.cdrivers/staging/xgifb/XGI_main_26.c +0
-0@@ -483,7 +483,7 @@ XGIfb_query_VGA_config_space(struct xgi_break ; }
Quoted 6 lines
drivers/staging/xgifb/XGI_main_26.c XGIfb_query_VGA_config_space(struct xgi_ · line 488
Quoted 4 lines
drivers/staging/xgifb/XGI_main_26.c +1
-1- pdev =pci_find_device (PCI_VENDOR_ID_SI , nbridge_id, pdev); + pdev =pci_get_device (PCI_VENDOR_ID_SI , nbridge_id, pdev);if (pdev) valid_pdev =1 ;hmm... I guess that a
pci_dev_put()call is lacking if it has been found.
Exactly, that is what is needed here.
thanks,
greg k-h