pci_find_device() in drivers/media/radio/
Sorry for late reply.
Quoted 7 lines · Christophe Lucas
Hi,
Description:
Quoted 4 lines
From : http://kerneljanitors.org/TODO
- delete all pci_find_* functions from the kernel tree. Instead ofpci_find_deviceusepci_get_device()..
- convert frompci_module_inittopci_register_driver
Patch per concept would be nice.
drivers/media/radio/radio-maestro.c static int __init maestro_radio_init(voi · line 268
Quoted 9 lines
diff -urpN -X /work/users/dontdiff
linux-2.6.11-rc2-vanilla/drivers/media/radio/radio-maestro.clinux-2.6.11-rc2/drivers/media/radio/radio-maestro.cdrivers/media/radio/radio-maestro.c +1
-1@@ -265,11 +265,11 @@ static int __init maestro_radio_init(voi { register __u16 found=0; struct pci_dev *pcidev = NULL; - while(!found && (pcidev = pci_find_device(PCI_VENDOR_ESS, + while(!found && (pcidev = pci_get_device(PCI_VENDOR_ESS,
you could loose trailing whitespace ^
Quoted 17 lines
drivers/media/radio/radio-maestro.c +2
-1PCI_DEVICE_ID_ESS_ESS1968, pcidev))) found |=radio_install (pcidev); -while (!found && (pcidev =pci_find_device (PCI_VENDOR_ESS , +while (!found && (pcidev =pci_get_device (PCI_VENDOR_ESS ,PCI_DEVICE_ID_ESS_ESS1978 , pcidev))) found |=radio_install (pcidev);@@ -316,6 +316,7 @@ static __u16 radio_install(struct pci_deif (radio_power_on (&radio_unit)) {if (video_register_device (&maestro_radio,VFL_TYPE_RADIO , radio_nr)==-1 ) {printk ("radio-maestro: can't register device!" ); +pci_dev_put (pcidev);return 0 ; } printk(KERN_INFO "radio-maestro: version "
drivers/media/radio/radio-maestro.c static __u16 radio_install(struct pci_de · line 331
Quoted 6 lines
drivers/media/radio/radio-maestro.c +2
-1@@ -326,7 +327,9 @@ static __u16 radio_install(struct pci_de "\n");printk (KERN_INFO "radio-maestro: radio chip initialized\n" );return 1 ; - }else + }else { +pci_dev_put (pcidev);
ditto.
drivers/media/radio/radio-maestro.c static __u16 radio_install(struct pci_de · line 334
Quoted 3 lines
drivers/media/radio/radio-maestro.c +1
-0return 0 ; + } }
Whitespace is nitpicking. :-)
About pci_dev_put... it should probably also be in _exit paths, so module can be reinserted?
Comments?
Domen
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 5 lines · Domen Puncer
Sorry for late reply.
Quoted 2 lines · Christophe Lucas
Hi,
Quoted 7 lines
Quoted 5 lines
Description:
Quoted 4 lines
From : http://kerneljanitors.org/TODO
- delete all pci_find_* functions from the kernel tree. Instead ofpci_find_deviceusepci_get_device()..
- convert frompci_module_inittopci_register_driverPatch per concept would be nice.
Yeah, afterwards, I have released patches by concept as you advise me here.
Quoted 1 line
Whitespace is nitpicking. :-)
I will pay attention on this. Thanks for all your comments. I am here to help and learn a lot from all of you.
Quoted 2 lines
About
pci_dev_put... it should probably also be in_exitpaths, so module can be reinserted?
You are right, I will soon released a patch that I hope correct.
Quoted 1 line
Comments?
Anymore comments, you are totally right.
~Christophe
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors