[Linux1394-cvslog] rev 568 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <hog...@li...> - 2002-09-12 19:13:15
|
Author: hogsberg Date: 2002-09-13 00:01:18 -0400 (Fri, 13 Sep 2002) New Revision: 568 Modified: trunk/video1394.c Log: Fix typo in page align computation, reported by Kurt Konolige, Modified: trunk/video1394.c ============================================================================== --- trunk/video1394.c (original) +++ trunk/video1394.c 2002-09-13 00:01:19.000000000 -0400 @@ -237,7 +237,8 @@ DBGMSG(d->ohci->id, "Freeing dma_iso_ctx %d", d->ctx); ohci1394_stop_context(d->ohci, d->ctrlClear, NULL); - ohci1394_unregister_iso_tasklet(d->ohci, &d->iso_tasklet); + if (d->iso_tasklet.link.next != NULL) + ohci1394_unregister_iso_tasklet(d->ohci, &d->iso_tasklet); if (d->buf) rvfree((void *)d->buf, d->num_desc * d->buf_size); @@ -277,8 +278,7 @@ struct dma_iso_ctx *d; int i; - d = (struct dma_iso_ctx *)kmalloc(sizeof(struct dma_iso_ctx), - GFP_KERNEL); + d = kmalloc(sizeof(struct dma_iso_ctx), GFP_KERNEL); if (d == NULL) { PRINT(KERN_ERR, ohci->id, "Failed to allocate dma_iso_ctx"); return NULL; @@ -291,7 +291,7 @@ d->channel = channel; d->num_desc = num_desc; d->frame_size = buf_size; - d->buf_size = (d->buf_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); + d->buf_size = PAGE_ALIGN(buf_size); d->last_buffer = -1; d->buf = NULL; d->ir_prg = NULL; |