Commit 156096a0 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: rename old auto-config functions

Rename `comedi_auto_config()` to `comedi_old_auto_config()`, and
`comedi_auto_config_wrapper()` to `comedi_old_auto_config_wrapper()`.
These functions are deprecated and will be removed once the few
remaining low-level comedi drivers that use them have been updated.
(The low-level drivers in question support auto-configuration of
detected comedi devices, but still use the `attach()` hook in their
`struct comedi_driver` to do so.)

This internal change frees up the name `comedi_auto_config` for future
use.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f9c3e4e7
...@@ -879,8 +879,8 @@ comedi_auto_config_helper(struct device *hardware_device, ...@@ -879,8 +879,8 @@ comedi_auto_config_helper(struct device *hardware_device,
return ret; return ret;
} }
static int comedi_auto_config_wrapper(struct comedi_device *dev, static int comedi_old_auto_config_wrapper(struct comedi_device *dev,
unsigned long context) unsigned long context)
{ {
struct comedi_devconfig *it = (struct comedi_devconfig *)context; struct comedi_devconfig *it = (struct comedi_devconfig *)context;
struct comedi_driver *driv = dev->driver; struct comedi_driver *driv = dev->driver;
...@@ -906,9 +906,9 @@ static int comedi_auto_config_wrapper(struct comedi_device *dev, ...@@ -906,9 +906,9 @@ static int comedi_auto_config_wrapper(struct comedi_device *dev,
return driv->attach(dev, it); return driv->attach(dev, it);
} }
static int comedi_auto_config(struct device *hardware_device, static int comedi_old_auto_config(struct device *hardware_device,
struct comedi_driver *driver, const int *options, struct comedi_driver *driver,
unsigned num_options) const int *options, unsigned num_options)
{ {
struct comedi_devconfig it; struct comedi_devconfig it;
...@@ -918,7 +918,7 @@ static int comedi_auto_config(struct device *hardware_device, ...@@ -918,7 +918,7 @@ static int comedi_auto_config(struct device *hardware_device,
BUG_ON(num_options > COMEDI_NDEVCONFOPTS); BUG_ON(num_options > COMEDI_NDEVCONFOPTS);
memcpy(it.options, options, num_options * sizeof(int)); memcpy(it.options, options, num_options * sizeof(int));
return comedi_auto_config_helper(hardware_device, driver, return comedi_auto_config_helper(hardware_device, driver,
comedi_auto_config_wrapper, comedi_old_auto_config_wrapper,
(unsigned long)&it); (unsigned long)&it);
} }
...@@ -979,8 +979,8 @@ static int comedi_old_pci_auto_config(struct pci_dev *pcidev, ...@@ -979,8 +979,8 @@ static int comedi_old_pci_auto_config(struct pci_dev *pcidev,
/* pci slot */ /* pci slot */
options[1] = PCI_SLOT(pcidev->devfn); options[1] = PCI_SLOT(pcidev->devfn);
return comedi_auto_config(&pcidev->dev, driver, return comedi_old_auto_config(&pcidev->dev, driver,
options, ARRAY_SIZE(options)); options, ARRAY_SIZE(options));
} }
static int comedi_pci_attach_wrapper(struct comedi_device *dev, static int comedi_pci_attach_wrapper(struct comedi_device *dev,
...@@ -1049,7 +1049,7 @@ EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister); ...@@ -1049,7 +1049,7 @@ EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister);
static int comedi_old_usb_auto_config(struct usb_interface *intf, static int comedi_old_usb_auto_config(struct usb_interface *intf,
struct comedi_driver *driver) struct comedi_driver *driver)
{ {
return comedi_auto_config(&intf->dev, driver, NULL, 0); return comedi_old_auto_config(&intf->dev, driver, NULL, 0);
} }
static int comedi_usb_attach_wrapper(struct comedi_device *dev, static int comedi_usb_attach_wrapper(struct comedi_device *dev,
......
Markdown is supported
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