Re: [PATCH 10/22] staging: comedi: das800: cleanup das800_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 17, 2015 at 03:22:04PM -0700, H Hartley Sweeten wrote:
> Make this function return a pointer to the boardinfo instead of an index.
> Since it's not typical, add a comment to clarify why this legacy driver
> does a probe.
> 
> Consolidate the dev_dbg() messages when a probed boardinfo is used and
> remove the extra dev_dbg() message when the boardinfo is not found.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/staging/comedi/drivers/das800.c | 63 ++++++++++++++++++---------------
>  1 file changed, 34 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c
> index 39d304a..9f553f7 100644
> --- a/drivers/staging/comedi/drivers/das800.c
> +++ b/drivers/staging/comedi/drivers/das800.c
> @@ -604,54 +604,62 @@ static int das800_do_insn_bits(struct comedi_device *dev,
>  	return insn->n;
>  }
>  
> -static int das800_probe(struct comedi_device *dev)
> +static const struct das800_board *das800_probe(struct comedi_device *dev)
>  {
> -	const struct das800_board *thisboard = dev->board_ptr;
> -	int board = thisboard ? thisboard - das800_boards : -EINVAL;
> +	const struct das800_board *board = dev->board_ptr;
> +	int index = board ? board - das800_boards : -EINVAL;
you are also changing the name from thisboard to board, which is not
mentioned in the commit message.

regards
sudip
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux