aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fb/splash.c
diff options
context:
space:
mode:
authorKazutaka YOKOTA <yokota@FreeBSD.org>1999-06-22 14:14:06 +0000
committerKazutaka YOKOTA <yokota@FreeBSD.org>1999-06-22 14:14:06 +0000
commit6e8394b8baa7d5d9153ab90de6824bcd19b3b4e1 (patch)
tree9e351e9bc1321f8edd02ee62faa03602423b4604 /sys/dev/fb/splash.c
parent6ca65df0a7aafa67751b58ef83e58b556aa627ca (diff)
Notes
Diffstat (limited to 'sys/dev/fb/splash.c')
-rw-r--r--sys/dev/fb/splash.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/fb/splash.c b/sys/dev/fb/splash.c
index e8f9cf237cc9..40f1d01a5585 100644
--- a/sys/dev/fb/splash.c
+++ b/sys/dev/fb/splash.c
@@ -35,8 +35,7 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/linker.h>
-
-#include <machine/console.h>
+#include <sys/fbio.h>
#include <dev/fb/fbreg.h>
#include <dev/fb/splashreg.h>
@@ -51,7 +50,8 @@ static splash_decoder_t **decoder_set;
#define DECODER_ARRAY_DELTA 4
/* console driver callback */
-static int (*splash_callback)(int);
+static int (*splash_callback)(int, void *);
+static void *splash_arg;
static int
splash_find_data(splash_decoder_t *decoder)
@@ -98,7 +98,7 @@ splash_new(splash_decoder_t *decoder)
{
splash_decoder = decoder;
if (splash_callback != NULL)
- (*splash_callback)(SPLASH_INIT);
+ (*splash_callback)(SPLASH_INIT, splash_arg);
}
int
@@ -159,12 +159,13 @@ splash_unregister(splash_decoder_t *decoder)
}
int
-splash_init(video_adapter_t *adp, int (*callback)(int))
+splash_init(video_adapter_t *adp, int (*callback)(int, void *), void *arg)
{
int i;
splash_adp = adp;
splash_callback = callback;
+ splash_arg = arg;
splash_decoder = NULL;
for (i = 0; i < decoders; ++i) {
@@ -187,9 +188,11 @@ splash_term(video_adapter_t *adp)
{
int error = 0;
+ if (splash_adp != adp)
+ return EINVAL;
if (splash_decoder != NULL) {
if (splash_callback != NULL)
- error = (*splash_callback)(SPLASH_TERM);
+ error = (*splash_callback)(SPLASH_TERM, splash_arg);
if (error == 0)
error = (*splash_decoder->term)(adp);
if (error == 0)