Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: r21912: Storage API : remove undeeded target-specific functions

Re: r21912: Storage API : remove undeeded target-specific functions

From: Rob Purchase <rob.purchase_at_googlemail.com>
Date: Fri, 17 Jul 2009 08:49:14 +0100

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.
Received on 2009-07-17


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa