On 17/07/2009 05:55, Thomas Martitz wrote:
storage_sleep, storage_spin, storage_spindown are only defined if #defiend (HAVE_DISK_STORAGE), not for MMC/ATA/SD remove already unneeded nand_disk_is_active, nand_soft_reset
Isn't the point of an API to forget about underlying differences so that a developer doesn't need to care/know about this differences? This commit introduces more (imo ugly) #ifdefs with destroying that point.
I agree, the idea of the storage_* layer was to hide the underlying differences and avoid the need for those #ifdefs.

A better solution might be for these functions to still exist at storage_* level, either by #defining to the relevant driver on single-storage-driver targets, or as an actual function on multi-driver targets. The storage rework patch (FS#9545) already goes some way towards this, but it does not yet remove the unncessary driver-specific functions. The actual driver-level functions could be voided, but not storage_*.

The problem with this approach is how to expose those functions to the plugin API on single-driver, non-ATA targets. A solution for this might simply be to always use a concrete storage_* function. I can't really see that being much of an overhead.

In any case, I would rather see this done as part of the existing storage rework patch.

Rob.

Reply via email to