On Wed, May 18, 2011 at 07:23:20PM +0200, Antonio Ospite wrote:

> So you mean something like the following:

> mmc_regulator_set_power(...)
> {

Yes.

>   2. Add a proper function with all the needed parameters to abstract
>      the actual var names, this would be something like:
>      mmc_regulator_set_power(mmc, power_mode, vdd, vcc, pdata)
>      and yet checking for pdata->setpower can be tricky as 'setpower' 
>      is an arbitrary name.

This would be good.

>   3. Move stuff from driver structures to subsystem structures, which I 
>      don't think is needed in this case.

Though this option is also common - often you get a mix of subsystem and
device specific things with for example a subsystem wide data structure
which the device keeps and passes into a function provided by the
subsystem at appropriate moments.

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to