Commit 7fc465b1 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: auto-config drivers do not need to set hw_dev



The comedi core now sets the 'hw_dev' pointer in the function
comedi_auto_config_helper() before calling the auto attach
function in the driver.

Remove the now unnecessary call to comedi_set_hw_dev() in the
drivers that use the auto-config attach mechanism.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c34fa261
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment