diff options
-rw-r--r-- | drivers/media/video/cafe_ccic.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 0fae0e000f1a..ccb37006bb18 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -62,13 +62,13 @@ MODULE_SUPPORTED_DEVICE("Video"); | |||
62 | */ | 62 | */ |
63 | 63 | ||
64 | #define MAX_DMA_BUFS 3 | 64 | #define MAX_DMA_BUFS 3 |
65 | static int alloc_bufs_at_load = 0; | 65 | static int alloc_bufs_at_read = 0; |
66 | module_param(alloc_bufs_at_load, bool, 0444); | 66 | module_param(alloc_bufs_at_read, bool, 0444); |
67 | MODULE_PARM_DESC(alloc_bufs_at_load, | 67 | MODULE_PARM_DESC(alloc_bufs_at_read, |
68 | "Non-zero value causes DMA buffers to be allocated at module " | 68 | "Non-zero value causes DMA buffers to be allocated when the " |
69 | "load time. This increases the chances of successfully getting " | 69 | "video capture device is read, rather than at module load " |
70 | "those buffers, but at the cost of nailing down the memory from " | 70 | "time. This saves memory, but decreases the chances of " |
71 | "the outset."); | 71 | "successfully getting those buffers."); |
72 | 72 | ||
73 | static int n_dma_bufs = 3; | 73 | static int n_dma_bufs = 3; |
74 | module_param(n_dma_bufs, uint, 0644); | 74 | module_param(n_dma_bufs, uint, 0644); |
@@ -1502,7 +1502,7 @@ static int cafe_v4l_release(struct inode *inode, struct file *filp) | |||
1502 | } | 1502 | } |
1503 | if (cam->users == 0) { | 1503 | if (cam->users == 0) { |
1504 | cafe_ctlr_power_down(cam); | 1504 | cafe_ctlr_power_down(cam); |
1505 | if (! alloc_bufs_at_load) | 1505 | if (alloc_bufs_at_read) |
1506 | cafe_free_dma_bufs(cam); | 1506 | cafe_free_dma_bufs(cam); |
1507 | } | 1507 | } |
1508 | mutex_unlock(&cam->s_mutex); | 1508 | mutex_unlock(&cam->s_mutex); |
@@ -2161,7 +2161,7 @@ static int cafe_pci_probe(struct pci_dev *pdev, | |||
2161 | /* | 2161 | /* |
2162 | * If so requested, try to get our DMA buffers now. | 2162 | * If so requested, try to get our DMA buffers now. |
2163 | */ | 2163 | */ |
2164 | if (alloc_bufs_at_load) { | 2164 | if (!alloc_bufs_at_read) { |
2165 | if (cafe_alloc_dma_bufs(cam, 1)) | 2165 | if (cafe_alloc_dma_bufs(cam, 1)) |
2166 | cam_warn(cam, "Unable to alloc DMA buffers at load" | 2166 | cam_warn(cam, "Unable to alloc DMA buffers at load" |
2167 | " will try again later."); | 2167 | " will try again later."); |