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.

Reply via email to