Hi joe9, I'm not really up on the changes in the kernel's PCI API, but I noticed that the changes you pushed are different in different files. Is that intentional?
In vti, you changed pci_find_device() to pci_get_device() and pci_dev_put(), but in motenc and the others, you changed pci_find_device() to just pci_get_device(). Why are they different? Here's a terse note on the subject, at Kernel Newbies from the inimitable Greg Kroah-Hartman (search for pci_find): http://kernelnewbies.org/KernelJanitors/Todo On 03/24/2012 02:26 PM, joe9 wrote: > changed pci_find_device to pci_get_device > > pci_find_device is deprecated > > > http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=3d2623f > > --- > src/hal/drivers/hal_motenc.c | 2 +- > src/hal/drivers/hal_vti.c | 3 ++- > src/hal/drivers/opto_ac5.c | 2 +- > 3 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/src/hal/drivers/hal_motenc.c b/src/hal/drivers/hal_motenc.c > index 9e80305..b64ed34 100644 > --- a/src/hal/drivers/hal_motenc.c > +++ b/src/hal/drivers/hal_motenc.c > @@ -291,7 +291,7 @@ rtapi_app_main(void) > > i = 0; > // Find a MOTENC card. > - while((i< MAX_DEVICES)&& ((pDev = pci_find_device(MOTENC_VENDOR_ID, > MOTENC_DEVICE_ID, pDev)) != NULL)){ > + while((i< MAX_DEVICES)&& ((pDev = pci_get_device(MOTENC_VENDOR_ID, > MOTENC_DEVICE_ID, pDev)) != NULL)){ > > // Allocate memory for device object. > pDevice = hal_malloc(sizeof(Device)); > diff --git a/src/hal/drivers/hal_vti.c b/src/hal/drivers/hal_vti.c > index 26d6002..f7ac0d3 100644 > --- a/src/hal/drivers/hal_vti.c > +++ b/src/hal/drivers/hal_vti.c > @@ -822,8 +822,9 @@ static int vti_init_card() > /* scans possible addresses for vti cards */ > static int vti_autodetect() > { > - dev = pci_find_device(VENDOR, DEVICE, dev); > + dev = pci_get_device(VENDOR, DEVICE, dev); > if (dev) { > + pci_dev_put(dev); > rtapi_print_msg(RTAPI_MSG_INFO, > "VTI: Card detected in slot: %2x\n", PCI_SLOT(dev->devfn)); > return (0); > diff --git a/src/hal/drivers/opto_ac5.c b/src/hal/drivers/opto_ac5.c > index 1f3b2d5..9dcaedf 100644 > --- a/src/hal/drivers/opto_ac5.c > +++ b/src/hal/drivers/opto_ac5.c > @@ -93,7 +93,7 @@ int rtapi_app_main(void) > for ( n = 0 ; n< MAX_BOARDS ; n++ ) > { > // Find a M5I20 card. > - pDev = pci_find_device(opto22_VENDOR_ID, opto22_pci_AC5_DEVICE_ID, > pDev); > + pDev = pci_get_device(opto22_VENDOR_ID, opto22_pci_AC5_DEVICE_ID, pDev); > if ( pDev == NULL ) { /* no more boards */break;} > > -- Sebastian Kuzminsky ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
