fb.c (94617) | fb.c (109623) |
---|---|
1/*- 2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/fb/fb.c 94617 2002-04-13 22:34:16Z obrien $ | 28 * $FreeBSD: head/sys/dev/fb/fb.c 109623 2003-01-21 08:56:16Z alfred $ |
29 */ 30 31#include "opt_fb.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/conf.h> 36#include <sys/bus.h> --- 44 unchanged lines hidden (view full) --- 81 int newsize; 82 int s; 83 84 if (!vid_malloc) 85 return ENOMEM; 86 87 s = spltty(); 88 newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA; | 29 */ 30 31#include "opt_fb.h" 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/conf.h> 36#include <sys/bus.h> --- 44 unchanged lines hidden (view full) --- 81 int newsize; 82 int s; 83 84 if (!vid_malloc) 85 return ENOMEM; 86 87 s = spltty(); 88 newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA; |
89 new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO); | 89 new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_ZERO); |
90 new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF, | 90 new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF, |
91 M_WAITOK | M_ZERO); | 91 M_ZERO); |
92#ifdef FB_INSTALL_CDEV 93 new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF, | 92#ifdef FB_INSTALL_CDEV 93 new_cdevsw = malloc(sizeof(*new_cdevsw)*newsize, M_DEVBUF, |
94 M_WAITOK | M_ZERO); | 94 M_ZERO); |
95#endif 96 bcopy(adapter, new_adp, sizeof(*adapter)*adapters); 97 bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters); 98#ifdef FB_INSTALL_CDEV 99 bcopy(vidcdevsw, new_cdevsw, sizeof(*vidcdevsw)*adapters); 100#endif 101 if (adapters > 1) { 102 free(adapter, M_DEVBUF); --- 739 unchanged lines hidden --- | 95#endif 96 bcopy(adapter, new_adp, sizeof(*adapter)*adapters); 97 bcopy(vidsw, new_vidsw, sizeof(*vidsw)*adapters); 98#ifdef FB_INSTALL_CDEV 99 bcopy(vidcdevsw, new_cdevsw, sizeof(*vidcdevsw)*adapters); 100#endif 101 if (adapters > 1) { 102 free(adapter, M_DEVBUF); --- 739 unchanged lines hidden --- |