提交 76cca89f 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: comedi_fops: move comedi_cleanup_legacy_minors()

This function is only called by the module_{init,exit} functions. For
aesthetic reasons, move it near them.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 91fa0b0c
...@@ -2197,14 +2197,6 @@ static const struct file_operations comedi_fops = { ...@@ -2197,14 +2197,6 @@ static const struct file_operations comedi_fops = {
static struct class *comedi_class; static struct class *comedi_class;
static struct cdev comedi_cdev; static struct cdev comedi_cdev;
static void comedi_cleanup_legacy_minors(void)
{
unsigned i;
for (i = 0; i < comedi_num_legacy_minors; i++)
comedi_free_board_minor(i);
}
void comedi_error(const struct comedi_device *dev, const char *s) void comedi_error(const struct comedi_device *dev, const char *s)
{ {
dev_err(dev->class_dev, "%s: %s\n", dev->driver->driver_name, s); dev_err(dev->class_dev, "%s: %s\n", dev->driver->driver_name, s);
...@@ -2427,6 +2419,14 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s) ...@@ -2427,6 +2419,14 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s)
kfree(info); kfree(info);
} }
static void comedi_cleanup_legacy_minors(void)
{
unsigned i;
for (i = 0; i < comedi_num_legacy_minors; i++)
comedi_free_board_minor(i);
}
static int __init comedi_init(void) static int __init comedi_init(void)
{ {
int i; int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册