Skip to content

Commit

Permalink
staging: comedi: change comedi_alloc_subdevice_minor parameters
Browse files Browse the repository at this point in the history
`comedi_alloc_subdevice_minor()` doesn't really need a parameter
pointing to a `struct comedi_device` as it can get this information from
the parameter pointing to a `struct comedi_subdevice`.  Just pass the
subdevice parameter.

Signed-by: Ian Abbott <abbotti@mev.co.uk>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Feb 4, 2013
1 parent e9ab1c2 commit f65cc54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2352,9 +2352,9 @@ int comedi_find_board_minor(struct device *hardware_device)
return -ENODEV;
}

int comedi_alloc_subdevice_minor(struct comedi_device *dev,
struct comedi_subdevice *s)
int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
{
struct comedi_device *dev = s->device;
struct comedi_file_info *info;
struct device *csdev;
unsigned i;
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/comedi/comedi_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev,
int comedi_alloc_board_minor(struct device *hardware_device);
void comedi_free_board_minor(unsigned minor);
int comedi_find_board_minor(struct device *hardware_device);
int comedi_alloc_subdevice_minor(struct comedi_device *dev,
struct comedi_subdevice *s);
int comedi_alloc_subdevice_minor(struct comedi_subdevice *s);
void comedi_free_subdevice_minor(struct comedi_subdevice *s);

int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static int __comedi_device_postconfig_async(struct comedi_device *dev,
return ret;
}

comedi_alloc_subdevice_minor(dev, s);
comedi_alloc_subdevice_minor(s);

return 0;
}
Expand Down

0 comments on commit f65cc54

Please sign in to comment.