summaryrefslogtreecommitdiffstats
path: root/firmware/ata_idle_notify.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-20 21:54:44 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-20 21:54:44 +0000
commit774bacc692b4d5c7b769bb88d24e182db9e4656f (patch)
tree07c5ed05c9d46145c783bd1de5062731e6babb32 /firmware/ata_idle_notify.c
parent872852639fc52bcdb2cc8199fed60f81c7cad1f9 (diff)
downloadrockbox-774bacc692b4d5c7b769bb88d24e182db9e4656f.tar.gz
rockbox-774bacc692b4d5c7b769bb88d24e182db9e4656f.tar.bz2
rockbox-774bacc692b4d5c7b769bb88d24e182db9e4656f.zip
Correct wrong usage of event callbacks all over the place. It's not supposed to return anything, and should take a data parameter.
Fixing it because correcting the event api prototypes causes many warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/ata_idle_notify.c')
-rw-r--r--firmware/ata_idle_notify.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/ata_idle_notify.c b/firmware/ata_idle_notify.c
index 99b1d4d786..35d192bee0 100644
--- a/firmware/ata_idle_notify.c
+++ b/firmware/ata_idle_notify.c
@@ -25,12 +25,12 @@
#include "kernel.h"
#include "string.h"
-void register_storage_idle_func(storage_idle_notify function)
+void register_storage_idle_func(void (*function)(void *data))
{
#if USING_STORAGE_CALLBACK
add_event(DISK_EVENT_SPINUP, true, function);
#else
- function(); /* just call the function now */
+ function(NULL); /* just call the function now */
/* this _may_ cause problems later if the calling function
sets a variable expecting the callback to unset it, because
the callback will be run before this function exits, so before the var is set */
@@ -38,12 +38,12 @@ void register_storage_idle_func(storage_idle_notify function)
}
#if USING_STORAGE_CALLBACK
-void unregister_storage_idle_func(storage_idle_notify func, bool run)
+void unregister_storage_idle_func(void (*func)(void *data), bool run)
{
remove_event(DISK_EVENT_SPINUP, func);
if (run)
- func();
+ func(NULL);
}
bool call_storage_idle_notifys(bool force)