[PATCH 00/48] staging: comedi: avoid using comedi_board()

Hartley Sweeten HartleyS at visionengravers.com
Tue Sep 9 16:28:38 UTC 2014


On Tuesday, September 09, 2014 3:26 AM, Ian Abbott wrote:
>
> The `comedi_board` inline function takes a single parameter of type
> `struct comedi_device *` and merely returns the value of the `board_ptr`
> member therein.  This is somewhat superfluous as the member can be
> accessed directly.
>
> Replace all uses of `comedi_board(dev)` with `dev->board_ptr`.
>
> Note, if there are any conflicts when applying this series, they can
> just be skipped for now and corrected later.
> 
> A subsequent patch will remove the `comedi_board` function, once there
> is nothing using it.

I would argue that the comedi_board() inline is a bit cleaner.

But, since all the goofy macros and private boardinfo access functions in
the drivers have been removed I guess this can go now. We will need
to make that sure any new drivers don't introduce new goofy macros
or access functions. The 'board(dev)->foo' ones really made the drivers
hard to read...

Reviewed-by: H Hartley Sweeten <hsweeten at visionengravers.com>



More information about the devel mailing list