Re: [PATCH 09/16] staging: comedi: ni_stc.h: the boardinfo 'name' should be first

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

 



On 2014-06-23 17:36, Ian Abbott wrote:
On 2014-06-20 19:10, H Hartley Sweeten wrote:
The comedi core expects the first member of the boardinfo to be a
'const char *' to the board name. The comedi_recognize() function
uses this to locate the correct boardinfo when doing a legacy
(*attach) to a comedi driver.

It doesn't matter in this case, as comedi_recognize() just returns NULL
for these drivers (because `num_names` in the struct comedi_driver is
0), but there's no harm putting the board name first for consistency!

So maybe the commit message should be something like:

By convention, the first member of the boardinfo is a 'const char *' to the board name, especially for those comedi drivers that rely on the comedi core to set dev->board_ptr to the entry matching the board name when doing a legacy (*attach) to a comedi driver.

Modify the ni_board_struct appropriately for consistency, although the board name is only used for informational purposes by this driver (only the driver name is matched by the comedi core).

For aesthetics, also move the members in the boardinfo declarations.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
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