]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-atapi.c
ide: add ide_init_pc() helper
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-atapi.c
index 3d44b45650f6ab1bb911b2dd86f0b3eb96de3b2e..8f0842ce77f57a485afd57bd7065060a8f51fdcd 100644 (file)
@@ -111,6 +111,14 @@ int ide_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
 }
 EXPORT_SYMBOL_GPL(ide_io_buffers);
 
+void ide_init_pc(struct ide_atapi_pc *pc)
+{
+       memset(pc, 0, sizeof(*pc));
+       pc->buf = pc->pc_buf;
+       pc->buf_size = IDE_PC_BUFFER_SIZE;
+}
+EXPORT_SYMBOL_GPL(ide_init_pc);
+
 /* TODO: unify the code thus making some arguments go away */
 ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
        ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry,