-/* $OpenBSD: agp.c,v 1.24 2008/07/12 17:31:06 oga Exp $ */
+/* $OpenBSD: agp.c,v 1.25 2008/08/17 21:31:38 oga Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
* All rights reserved.
{
struct agp_softc *sc = (struct agp_softc *)dev;
+ if (sc->sc_chipc == NULL)
+ return (EINVAL);
+
if (sc->sc_state != AGP_ACQUIRE_FREE)
return (EBUSY);
sc->sc_state = state;
}
void
-agp_memory_info(void *dev, void *handle, struct
- agp_memory_info *mi)
+agp_memory_info(void *dev, void *handle, struct agp_memory_info *mi)
{
struct agp_memory *mem = (struct agp_memory *) handle;