[SCSI] aic7xxx: Remove OS utility wrappers
This patch removes malloc(), free(), and printf() wrappers from the aic7xxx
SCSI driver. I didn't use pr_debug for printf because of some 'clever' uses of
printf don't compile with the pr_debug. I didn't fix the overeager uses of
GFP_ATOMIC either because I wanted to keep this patch as simple as possible.
[jejb:fixed up checkpatch errors and fixed up missed conversion]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c
index e92991a..f2525f8 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c
@@ -248,13 +248,13 @@
ahc_pause(ahc);
if (length != sizeof(struct seeprom_config)) {
- printf("ahc_proc_write_seeprom: incorrect buffer size\n");
+ printk("ahc_proc_write_seeprom: incorrect buffer size\n");
goto done;
}
have_seeprom = ahc_verify_cksum((struct seeprom_config*)buffer);
if (have_seeprom == 0) {
- printf("ahc_proc_write_seeprom: cksum verification failed\n");
+ printk("ahc_proc_write_seeprom: cksum verification failed\n");
goto done;
}
@@ -290,26 +290,25 @@
sd.sd_DI = DI_2840;
have_seeprom = TRUE;
} else {
- printf("ahc_proc_write_seeprom: unsupported adapter type\n");
+ printk("ahc_proc_write_seeprom: unsupported adapter type\n");
goto done;
}
if (!have_seeprom) {
- printf("ahc_proc_write_seeprom: No Serial EEPROM\n");
+ printk("ahc_proc_write_seeprom: No Serial EEPROM\n");
goto done;
} else {
u_int start_addr;
if (ahc->seep_config == NULL) {
- ahc->seep_config = malloc(sizeof(*ahc->seep_config),
- M_DEVBUF, M_NOWAIT);
+ ahc->seep_config = kmalloc(sizeof(*ahc->seep_config), GFP_ATOMIC);
if (ahc->seep_config == NULL) {
- printf("aic7xxx: Unable to allocate serial "
+ printk("aic7xxx: Unable to allocate serial "
"eeprom buffer. Write failing\n");
goto done;
}
}
- printf("aic7xxx: Writing Serial EEPROM\n");
+ printk("aic7xxx: Writing Serial EEPROM\n");
start_addr = 32 * (ahc->channel - 'A');
ahc_write_seeprom(&sd, (u_int16_t *)buffer, start_addr,
sizeof(struct seeprom_config)/2);