aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:37 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:37 -0400
commit7bf7420a318978cd6042e5a5da34b7cfa18ae559 (patch)
tree7498ae013e3603dc66628873eaa2647fd001fe98 /drivers/ide/ide-atapi.c
parent385a4b8787c70b708688bee65139f15b0f79f144 (diff)
ide: add ide_init_pc() helper
* Add IDE_PC_BUFFER_SIZE define. * Add ide_init_pc() and convert ide-{floppy,tape}.c to use it instead of ide*_init_pc(). * Remove no longer used IDE*_PC_BUFFER_SIZE and ide*_init_pc(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 3d44b45650f6..8f0842ce77f5 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -111,6 +111,14 @@ int ide_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
111} 111}
112EXPORT_SYMBOL_GPL(ide_io_buffers); 112EXPORT_SYMBOL_GPL(ide_io_buffers);
113 113
114void ide_init_pc(struct ide_atapi_pc *pc)
115{
116 memset(pc, 0, sizeof(*pc));
117 pc->buf = pc->pc_buf;
118 pc->buf_size = IDE_PC_BUFFER_SIZE;
119}
120EXPORT_SYMBOL_GPL(ide_init_pc);
121
114/* TODO: unify the code thus making some arguments go away */ 122/* TODO: unify the code thus making some arguments go away */
115ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, 123ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
116 ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, 124 ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry,