Skip to content

Commit

Permalink
staging: comedi: comedi_fops: move comedi_cleanup_legacy_minors()
Browse files Browse the repository at this point in the history
This function is only called by the module_{init,exit} functions. For
aesthetic reasons, move it near them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 91fa0b0 commit 76cca89
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,14 +2197,6 @@ static const struct file_operations comedi_fops = {
static struct class *comedi_class;
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)
{
dev_err(dev->class_dev, "%s: %s\n", dev->driver->driver_name, s);
Expand Down Expand Up @@ -2427,6 +2419,14 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s)
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)
{
int i;
Expand Down

0 comments on commit 76cca89

Please sign in to comment.