staging: comedi: return void from comedi_driver_unregister()
'Unregister' functions generally return `void`. `comedi_driver_unregister()` currently returns an `int` errno value. Nothing looks at the return value. Change the return type to `void`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ee68080d2c
commit
99c0e26917
|
@ -363,7 +363,7 @@ int comedi_auto_config(struct device *, struct comedi_driver *,
|
||||||
void comedi_auto_unconfig(struct device *);
|
void comedi_auto_unconfig(struct device *);
|
||||||
|
|
||||||
int comedi_driver_register(struct comedi_driver *);
|
int comedi_driver_register(struct comedi_driver *);
|
||||||
int comedi_driver_unregister(struct comedi_driver *);
|
void comedi_driver_unregister(struct comedi_driver *);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* module_comedi_driver() - Helper macro for registering a comedi driver
|
* module_comedi_driver() - Helper macro for registering a comedi driver
|
||||||
|
|
|
@ -559,7 +559,7 @@ int comedi_driver_register(struct comedi_driver *driver)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(comedi_driver_register);
|
EXPORT_SYMBOL_GPL(comedi_driver_register);
|
||||||
|
|
||||||
int comedi_driver_unregister(struct comedi_driver *driver)
|
void comedi_driver_unregister(struct comedi_driver *driver)
|
||||||
{
|
{
|
||||||
struct comedi_driver *prev;
|
struct comedi_driver *prev;
|
||||||
int i;
|
int i;
|
||||||
|
@ -584,15 +584,14 @@ int comedi_driver_unregister(struct comedi_driver *driver)
|
||||||
|
|
||||||
if (comedi_drivers == driver) {
|
if (comedi_drivers == driver) {
|
||||||
comedi_drivers = driver->next;
|
comedi_drivers = driver->next;
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (prev = comedi_drivers; prev->next; prev = prev->next) {
|
for (prev = comedi_drivers; prev->next; prev = prev->next) {
|
||||||
if (prev->next == driver) {
|
if (prev->next == driver) {
|
||||||
prev->next = driver->next;
|
prev->next = driver->next;
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(comedi_driver_unregister);
|
EXPORT_SYMBOL_GPL(comedi_driver_unregister);
|
||||||
|
|
Loading…
Reference in a new issue