Browse Source

Merge branch 'zalloc'

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
627feee265
5 changed files with 10 additions and 5 deletions
  1. 2
    1
      src/drivers/bus/eisa.c
  2. 2
    1
      src/drivers/bus/isa.c
  3. 2
    1
      src/drivers/bus/isapnp.c
  4. 2
    1
      src/drivers/bus/mca.c
  5. 2
    1
      src/drivers/bus/pci.c

+ 2
- 1
src/drivers/bus/eisa.c View File

106
 	for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
106
 	for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
107
 		/* Allocate struct eisa_device */
107
 		/* Allocate struct eisa_device */
108
 		if ( ! eisa )
108
 		if ( ! eisa )
109
-			eisa = zalloc ( sizeof ( *eisa ) );
109
+			eisa = malloc ( sizeof ( *eisa ) );
110
 		if ( ! eisa ) {
110
 		if ( ! eisa ) {
111
 			rc = -ENOMEM;
111
 			rc = -ENOMEM;
112
 			goto err;
112
 			goto err;
113
 		}
113
 		}
114
+		memset ( eisa, 0, sizeof ( *eisa ) );
114
 		eisa->slot = slot;
115
 		eisa->slot = slot;
115
 		eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );
116
 		eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );
116
 
117
 

+ 2
- 1
src/drivers/bus/isa.c View File

105
 		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
105
 		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
106
 			/* Allocate struct isa_device */
106
 			/* Allocate struct isa_device */
107
 			if ( ! isa )
107
 			if ( ! isa )
108
-				isa = zalloc ( sizeof ( *isa ) );
108
+				isa = malloc ( sizeof ( *isa ) );
109
 			if ( ! isa ) {
109
 			if ( ! isa ) {
110
 				rc = -ENOMEM;
110
 				rc = -ENOMEM;
111
 				goto err;
111
 				goto err;
112
 			}
112
 			}
113
+			memset ( isa, 0, sizeof ( *isa ) );
113
 			isa->driver = driver;
114
 			isa->driver = driver;
114
 			isa->ioaddr = ISA_IOADDR ( driver, ioidx );
115
 			isa->ioaddr = ISA_IOADDR ( driver, ioidx );
115
 
116
 

+ 2
- 1
src/drivers/bus/isapnp.c View File

653
 
653
 
654
 			/* Allocate struct isapnp_device */
654
 			/* Allocate struct isapnp_device */
655
 			if ( ! isapnp )
655
 			if ( ! isapnp )
656
-				isapnp = zalloc ( sizeof ( *isapnp ) );
656
+				isapnp = malloc ( sizeof ( *isapnp ) );
657
 			if ( ! isapnp ) {
657
 			if ( ! isapnp ) {
658
 				rc = -ENOMEM;
658
 				rc = -ENOMEM;
659
 				goto err;
659
 				goto err;
660
 			}
660
 			}
661
+			memset ( isapnp, 0, sizeof ( *isapnp ) );
661
 			isapnp->csn = csn;
662
 			isapnp->csn = csn;
662
 			isapnp->logdev = logdev;
663
 			isapnp->logdev = logdev;
663
 
664
 

+ 2
- 1
src/drivers/bus/mca.c View File

90
 	for ( slot = 0 ; slot <= MCA_MAX_SLOT_NR ; slot++ ) {
90
 	for ( slot = 0 ; slot <= MCA_MAX_SLOT_NR ; slot++ ) {
91
 		/* Allocate struct mca_device */
91
 		/* Allocate struct mca_device */
92
 		if ( ! mca )
92
 		if ( ! mca )
93
-			mca = zalloc ( sizeof ( *mca ) );
93
+			mca = malloc ( sizeof ( *mca ) );
94
 		if ( ! mca ) {
94
 		if ( ! mca ) {
95
 			rc = -ENOMEM;
95
 			rc = -ENOMEM;
96
 			goto err;
96
 			goto err;
97
 		}
97
 		}
98
+		memset ( mca, 0, sizeof ( *mca ) );
98
 		mca->slot = slot;
99
 		mca->slot = slot;
99
 
100
 
100
 		/* Make sure motherboard setup is off */
101
 		/* Make sure motherboard setup is off */

+ 2
- 1
src/drivers/bus/pci.c View File

245
 
245
 
246
 			/* Allocate struct pci_device */
246
 			/* Allocate struct pci_device */
247
 			if ( ! pci )
247
 			if ( ! pci )
248
-				pci = zalloc ( sizeof ( *pci ) );
248
+				pci = malloc ( sizeof ( *pci ) );
249
 			if ( ! pci ) {
249
 			if ( ! pci ) {
250
 				rc = -ENOMEM;
250
 				rc = -ENOMEM;
251
 				goto err;
251
 				goto err;
252
 			}
252
 			}
253
+			memset ( pci, 0, sizeof ( *pci ) );
253
 			pci->bus = bus;
254
 			pci->bus = bus;
254
 			pci->devfn = devfn;
255
 			pci->devfn = devfn;
255
 			
256
 			

Loading…
Cancel
Save