diff --git a/drivers/staging/comedi/drivers/8255_pci.c b/drivers/staging/comedi/drivers/8255_pci.c index 6a4f2a1ea6629030f1c38da19644ca4f556f30c9..6191a82f89a5525464a74a0832973233349701d1 100644 --- a/drivers/staging/comedi/drivers/8255_pci.c +++ b/drivers/staging/comedi/drivers/8255_pci.c @@ -227,8 +227,6 @@ static int pci_8255_attach_pci(struct comedi_device *dev, int ret; int i; - comedi_set_hw_dev(dev, &pcidev->dev); - board = pci_8255_find_boardinfo(dev, pcidev); if (!board) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c index 343422abcd31d4b22f345e40181d711a32932013..350e87dd04d9ee2228a88400c479f9272fd2af32 100644 --- a/drivers/staging/comedi/drivers/adl_pci6208.c +++ b/drivers/staging/comedi/drivers/adl_pci6208.c @@ -183,8 +183,6 @@ static int pci6208_attach_pci(struct comedi_device *dev, unsigned int val; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - boardinfo = pci6208_find_boardinfo(dev, pcidev); if (!boardinfo) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c index 599714e978b581d184f26c40a7a5f3d6f3c6b668..8eee2fa0bf00bea1e68a20b7d05647a72766d097 100644 --- a/drivers/staging/comedi/drivers/adl_pci7x3x.c +++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c @@ -177,8 +177,6 @@ static int adl_pci7x3x_attach_pci(struct comedi_device *dev, int nchan; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - board = adl_pci7x3x_find_boardinfo(dev, pcidev); if (!board) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c index 5a6d6d2e21b87efd816a798a064d09e1a8344a04..9999f938745eebc99a994560326af70661b8cb2c 100644 --- a/drivers/staging/comedi/drivers/adl_pci8164.c +++ b/drivers/staging/comedi/drivers/adl_pci8164.c @@ -218,8 +218,6 @@ static int adl_pci8164_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - dev->board_name = dev->driver->driver_name; ret = comedi_pci_enable(pcidev, dev->board_name); diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index aa55443742cac871ece1f720d7ca746ab686a5f5..236a88946d006d0f9b421e7abc1aa2296db97523 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -886,7 +886,6 @@ static int pci9111_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); dev->board_name = dev->driver->driver_name; dev_private = kzalloc(sizeof(*dev_private), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 4161cb6be488d16b0850f9e5450552630bc9244c..6131a0a7aa964357b9aaaacab5a4953e1ea73ba9 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -1265,8 +1265,6 @@ static int pci1710_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret, subdev, n_subdevices; - comedi_set_hw_dev(dev, &pcidev->dev); - this_board = pci1710_find_boardinfo(dev, pcidev); if (!this_board) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/adv_pci1723.c b/drivers/staging/comedi/drivers/adv_pci1723.c index d14ddcb17520a88f9286bfae91522cb446d26fba..2eaf56dcc952e94ebebe0b1fe983545386cec35d 100644 --- a/drivers/staging/comedi/drivers/adv_pci1723.c +++ b/drivers/staging/comedi/drivers/adv_pci1723.c @@ -241,7 +241,6 @@ static int pci1723_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); dev->board_name = dev->driver->driver_name; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c index 47a7584d291f03f64705446d1d193674835cea42..4b29f6d050507efbb7a313078a0ac1228ab9b1eb 100644 --- a/drivers/staging/comedi/drivers/adv_pci_dio.c +++ b/drivers/staging/comedi/drivers/adv_pci_dio.c @@ -1100,8 +1100,6 @@ static int pci_dio_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret, subdev, i, j; - comedi_set_hw_dev(dev, &pcidev->dev); - this_board = pci_dio_find_boardinfo(dev, pcidev); if (!this_board) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c index 3f4f8bef692bf81abf95102a598f3a525373706e..0e4d189d1951a850973f5d2dfa31c91904be015d 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c @@ -1478,8 +1478,6 @@ static int cb_pcidas_attach_pci(struct comedi_device *dev, int i; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - thisboard = cb_pcidas_find_boardinfo(dev, pcidev); if (!thisboard) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c index 07a8969c8919790505ef264502763e94cb9491c1..798374fe8da994472169b9a76f009be565205243 100644 --- a/drivers/staging/comedi/drivers/cb_pcidda.c +++ b/drivers/staging/comedi/drivers/cb_pcidda.c @@ -656,8 +656,6 @@ static int cb_pcidda_attach_pci(struct comedi_device *dev, int index; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - thisboard = cb_pcidda_find_boardinfo(dev, pcidev); if (!pcidev) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index 9df9a02553c0fb74d296c0fb4bb6759e8542b0f9..138cfb15814c8de8c9d31fb8edcc1cb92c2daef2 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -215,8 +215,6 @@ static int cb_pcimdas_attach_pci(struct comedi_device *dev, unsigned long iobase_8255; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - dev->board_name = dev->driver->driver_name; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c index 651cf18cd606c21d923acc9667ce310014d566a3..9c01500492420de3954e6e718002babe514b789e 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdda.c +++ b/drivers/staging/comedi/drivers/cb_pcimdda.c @@ -159,7 +159,6 @@ static int cb_pcimdda_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); dev->board_name = dev->driver->driver_name; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c index 178a6a4bb7d58203dc197d070078c2b1c480ec9b..70a9243cf33c1c51dd3dae5f06312546ed8bd596 100644 --- a/drivers/staging/comedi/drivers/contec_pci_dio.c +++ b/drivers/staging/comedi/drivers/contec_pci_dio.c @@ -74,8 +74,6 @@ static int contec_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - dev->board_name = dev->driver->driver_name; ret = comedi_pci_enable(pcidev, dev->board_name); diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 513056d232f492b176e9c442062eccc38b31df4a..87b9cd572f800d714813aad4ad652ed543168a7d 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -698,8 +698,6 @@ static int daqboard2000_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int result; - comedi_set_hw_dev(dev, &pcidev->dev); - board = daqboard2000_find_boardinfo(dev, pcidev); if (!board) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index 4fa8f0baa4ac9f68a0813aa4ec287f2373118e16..fe5cf77a6aac1c947d7d52d6f34c9f2fce06c404 100644 --- a/drivers/staging/comedi/drivers/das08.c +++ b/drivers/staging/comedi/drivers/das08.c @@ -795,7 +795,7 @@ das08_attach_pci(struct comedi_device *dev, struct pci_dev *pdev) dev_err(dev->class_dev, "BUG! cannot determine board type!\n"); return -EINVAL; } - comedi_set_hw_dev(dev, &pdev->dev); + /* enable PCI device and reserve I/O spaces */ if (comedi_pci_enable(pdev, dev->driver->driver_name)) { dev_err(dev->class_dev, diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c index 98e2ffb1992951293b60e62428b536370193ca04..c345660d781aacf9b0bdaf490a2cdd59f15d7b36 100644 --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c @@ -186,8 +186,6 @@ static int dyna_pci10xx_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - dev->board_name = dev->driver->driver_name; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index 8a3f63484371b4be417ded8dd6461f961b1c250e..51af903773e296978c0966b810121e5a9ace2a11 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c @@ -502,7 +502,6 @@ static int icp_multi_attach_pci(struct comedi_device *dev, resource_size_t iobase; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); dev->board_name = dev->driver->driver_name; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c index 8e37cff1bd8edb52d828fc2ccb1de7f3fe4ec816..355af553ed53f5159e20da37a1b46b5ff5be3ab9 100644 --- a/drivers/staging/comedi/drivers/ke_counter.c +++ b/drivers/staging/comedi/drivers/ke_counter.c @@ -94,8 +94,6 @@ static int cnt_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); - dev->board_name = dev->driver->driver_name; ret = comedi_pci_enable(pcidev, dev->board_name); diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index ae91837fe7eb3e718fcbf0968635fc1fecce8fb3..ba7fd9d53d1955c88062fbbf7b1e5a03854fef0d 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -1578,8 +1578,6 @@ static int me4000_attach_pci(struct comedi_device *dev, struct comedi_subdevice *s; int result; - comedi_set_hw_dev(dev, &pcidev->dev); - thisboard = me4000_find_boardinfo(dev, pcidev); if (!thisboard) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c index 33b13aedfc021c9b13d42b16041367e74d4ea503..271db1cb6070868f21fa43c61202ecb163a7848f 100644 --- a/drivers/staging/comedi/drivers/me_daq.c +++ b/drivers/staging/comedi/drivers/me_daq.c @@ -648,8 +648,6 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) resource_size_t regbase_tmp; int result, error; - comedi_set_hw_dev(dev, &pcidev->dev); - board = me_find_boardinfo(dev, pcidev); if (!board) return -ENODEV; diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 3cff208de8a31f75ed94cd03472f701daacbca83..5e1d8308faa9cf80893339f5ec0c469c4772928e 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -1083,7 +1083,7 @@ static int __devinit ni_660x_attach_pci(struct comedi_device *dev, dev_warn(dev->class_dev, "error setting up mite\n"); return ret; } - comedi_set_hw_dev(dev, &devpriv->mite->pcidev->dev); + ret = ni_660x_alloc_mite_rings(dev); if (ret < 0) return ret; diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index fcf56cf4811b77ef2ec732b20d0020401d9e706e..0a556c7f9bc42bb8e92d080be23a4f846146976c 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -1147,7 +1147,7 @@ static int __devinit nidio_attach_pci(struct comedi_device *dev, dev_warn(dev->class_dev, "error setting up mite\n"); return ret; } - comedi_set_hw_dev(dev, &devpriv->mite->pcidev->dev); + devpriv->di_mite_ring = mite_alloc_ring(devpriv->mite); if (devpriv->di_mite_ring == NULL) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index 2e6dbeec9a9cac8ec6284b242d6785811e79813e..4adb4ba545caf439c3e41c8dfb539ba324ffa019 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c @@ -1661,7 +1661,7 @@ static int __devinit pcimio_attach_pci(struct comedi_device *dev, pr_warn("error setting up mite\n"); return ret; } - comedi_set_hw_dev(dev, &devpriv->mite->pcidev->dev); + devpriv->ai_mite_ring = mite_alloc_ring(devpriv->mite); if (devpriv->ai_mite_ring == NULL) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 7c50b01f6a6fb7fbc9d4713e0f54a2119a9f8535..15755325121dbb9174200532e93151484b4fb973 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2697,7 +2697,6 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) struct comedi_subdevice *s; int ret; - comedi_set_hw_dev(dev, &pcidev->dev); dev->board_name = dev->driver->driver_name; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);