diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-streams.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index 2e632014c90d..fab5c51b1519 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -150,7 +150,7 @@ static void ivtv_stream_init(struct ivtv *itv, int type) | |||
150 | s->dma = ivtv_stream_info[type].dma; | 150 | s->dma = ivtv_stream_info[type].dma; |
151 | s->buf_size = itv->stream_buf_size[type]; | 151 | s->buf_size = itv->stream_buf_size[type]; |
152 | if (s->buf_size) | 152 | if (s->buf_size) |
153 | s->buffers = itv->options.megabytes[type] * 1024 * 1024 / s->buf_size; | 153 | s->buffers = (itv->options.kilobytes[type] * 1024 + s->buf_size - 1) / s->buf_size; |
154 | spin_lock_init(&s->qlock); | 154 | spin_lock_init(&s->qlock); |
155 | init_waitqueue_head(&s->waitq); | 155 | init_waitqueue_head(&s->waitq); |
156 | s->id = -1; | 156 | s->id = -1; |
@@ -192,7 +192,7 @@ static int ivtv_reg_dev(struct ivtv *itv, int type) | |||
192 | /* User explicitly selected 0 buffers for these streams, so don't | 192 | /* User explicitly selected 0 buffers for these streams, so don't |
193 | create them. */ | 193 | create them. */ |
194 | if (minor >= 0 && ivtv_stream_info[type].dma != PCI_DMA_NONE && | 194 | if (minor >= 0 && ivtv_stream_info[type].dma != PCI_DMA_NONE && |
195 | itv->options.megabytes[type] == 0) { | 195 | itv->options.kilobytes[type] == 0) { |
196 | IVTV_INFO("Disabled %s device\n", ivtv_stream_info[type].name); | 196 | IVTV_INFO("Disabled %s device\n", ivtv_stream_info[type].name); |
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
@@ -238,18 +238,18 @@ static int ivtv_reg_dev(struct ivtv *itv, int type) | |||
238 | 238 | ||
239 | switch (vfl_type) { | 239 | switch (vfl_type) { |
240 | case VFL_TYPE_GRABBER: | 240 | case VFL_TYPE_GRABBER: |
241 | IVTV_INFO("Registered device video%d for %s (%d MB)\n", | 241 | IVTV_INFO("Registered device video%d for %s (%d kB)\n", |
242 | s->v4l2dev->minor, s->name, itv->options.megabytes[type]); | 242 | s->v4l2dev->minor, s->name, itv->options.kilobytes[type]); |
243 | break; | 243 | break; |
244 | case VFL_TYPE_RADIO: | 244 | case VFL_TYPE_RADIO: |
245 | IVTV_INFO("Registered device radio%d for %s\n", | 245 | IVTV_INFO("Registered device radio%d for %s\n", |
246 | s->v4l2dev->minor - MINOR_VFL_TYPE_RADIO_MIN, s->name); | 246 | s->v4l2dev->minor - MINOR_VFL_TYPE_RADIO_MIN, s->name); |
247 | break; | 247 | break; |
248 | case VFL_TYPE_VBI: | 248 | case VFL_TYPE_VBI: |
249 | if (itv->options.megabytes[type]) | 249 | if (itv->options.kilobytes[type]) |
250 | IVTV_INFO("Registered device vbi%d for %s (%d MB)\n", | 250 | IVTV_INFO("Registered device vbi%d for %s (%d kB)\n", |
251 | s->v4l2dev->minor - MINOR_VFL_TYPE_VBI_MIN, | 251 | s->v4l2dev->minor - MINOR_VFL_TYPE_VBI_MIN, |
252 | s->name, itv->options.megabytes[type]); | 252 | s->name, itv->options.kilobytes[type]); |
253 | else | 253 | else |
254 | IVTV_INFO("Registered device vbi%d for %s\n", | 254 | IVTV_INFO("Registered device vbi%d for %s\n", |
255 | s->v4l2dev->minor - MINOR_VFL_TYPE_VBI_MIN, s->name); | 255 | s->v4l2dev->minor - MINOR_VFL_TYPE_VBI_MIN, s->name); |