From: Ian Abbott Date: Thu, 4 Apr 2013 13:59:16 +0000 (+0100) Subject: staging: comedi: simplify comedi_board_minor_table[] X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~137^2~272 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb6b79dedb5e57a51761d5d08540b5e1127df571;p=pandora-kernel.git staging: comedi: simplify comedi_board_minor_table[] `comedi_alloc_board_minor()` allocates and initializes a `struct comedi_file_info` and a `struct comedi_device`, and assigns a board minor device number (if there are any available), storing a pointer to the allocated `struct comedi_file_info` in `comedi_board_minor_table[minor]` where `minor` is the board minor device number. There is no longer anything useful in the `struct comedi_file_info` apart from the pointer to the `struct comedi_device` that was allocated, so the `struct comedi_file_info` is superfluous. Change `comedi_board_minor_table[]` to hold pointers to the actual `struct comedi_device`'s. `comedi_alloc_board_minor()` no longer needs to allocate a `struct comedi_file_info`. Replace `comedi_free_board_file_info()` with `comedi_free_board_dev()` with its parameter pointing to the `struct comedi_device` to be freed (there is no longer a `struct comedi_file_info` to be freed). There are consequential changes to `comedi_dev_from_board_minor()`, `comedi_clear_board_minor()` (which now returns a `struct comedi_device *`), `comedi_free_board_minor()`, `comedi_release_hardware_device()` and `comedi_unlocked_ioctl()` (when dealing with detachment of a dynamically allocated comedi device by the `COMEDI_DEVCONFIG` ioctl). `comedi_dev_from_file_info()` is no longer used as a result of the above changes so remove it. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed