Commit e68f608e authored by 邱宗炽's avatar 邱宗炽

typo fix and format adjust

Signed-off-by: default avatar邱宗炽 <tqiu@neuros.com.cn>
parent e1da1221
...@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL"); ...@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");
#define DEVICE_DEACTIVATE(x) do { \ #define DEVICE_DEACTIVATE(x) do { \
if ((x) && (x)->capture_device_deactive && \ if ((x) && (x)->capture_device_deactive && \
(x)->capture_device_deactive()) \ (x)->capture_device_deactive()) \
debug_print(KERN_ERR\ debug_print(KERN_ERR \
"capture device %s deactivate failed\n", \ "capture device %s deactivate failed\n", \
(x)->name); \ (x)->name); \
} while (0) } while (0)
...@@ -196,7 +196,6 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -196,7 +196,6 @@ static int buffer_prepare(struct videobuf_queue *q,
{ {
vpfe_obj *vpfe = &vpfe_device; vpfe_obj *vpfe = &vpfe_device;
if (vb->state == STATE_NEEDS_INIT) { if (vb->state == STATE_NEEDS_INIT) {
vb->width = vpfe->vwin.width; vb->width = vpfe->vwin.width;
vb->height = vpfe->vwin.height; vb->height = vpfe->vwin.height;
...@@ -208,11 +207,13 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -208,11 +207,13 @@ static int buffer_prepare(struct videobuf_queue *q,
return 0; return 0;
} }
static void static void
buffer_config(struct videobuf_queue *q, unsigned int count) buffer_config(struct videobuf_queue *q, unsigned int count)
{ {
vpfe_obj *vpfe = &vpfe_device; vpfe_obj *vpfe = &vpfe_device;
int i; int i;
for(i = 0; i < count; i++) { for(i = 0; i < count; i++) {
q->bufs[i]->boff = virt_to_phys(vpfe->fbuffers[i]); q->bufs[i]->boff = virt_to_phys(vpfe->fbuffers[i]);
debug_print(KERN_INFO "buffer address: %x\n", q->bufs[i]->boff); debug_print(KERN_INFO "buffer address: %x\n", q->bufs[i]->boff);
...@@ -226,7 +227,6 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size) ...@@ -226,7 +227,6 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
int i; int i;
*size = VPFE_MAX_FBUF_SIZE; *size = VPFE_MAX_FBUF_SIZE;
for (i = VPFE_DEFNUM_FBUFS; i < *count; i++) { for (i = VPFE_DEFNUM_FBUFS; i < *count; i++) {
u32 size = PAGE_SIZE << VPFE_MAX_FBUF_ORDER; u32 size = PAGE_SIZE << VPFE_MAX_FBUF_ORDER;
void *mem = (void *)__get_free_pages(GFP_KERNEL |GFP_DMA, void *mem = (void *)__get_free_pages(GFP_KERNEL |GFP_DMA,
...@@ -253,6 +253,7 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size) ...@@ -253,6 +253,7 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
{ {
vpfe_obj *vpfe = &vpfe_device; vpfe_obj *vpfe = &vpfe_device;
/* add the buffer to the DMA queue */ /* add the buffer to the DMA queue */
list_add_tail(&vb->queue, &vpfe->dma_queue); list_add_tail(&vb->queue, &vpfe->dma_queue);
vb->state = STATE_QUEUED; vb->state = STATE_QUEUED;
...@@ -270,7 +271,6 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) ...@@ -270,7 +271,6 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
} }
} }
static struct videobuf_queue_ops video_qops = { static struct videobuf_queue_ops video_qops = {
.buf_setup = buffer_setup, .buf_setup = buffer_setup,
.buf_prepare = buffer_prepare, .buf_prepare = buffer_prepare,
...@@ -305,6 +305,7 @@ static int vpfe_select_capture_device(int id) ...@@ -305,6 +305,7 @@ static int vpfe_select_capture_device(int id)
{ {
int err = 0; int err = 0;
struct vpfe_capture_device *device; struct vpfe_capture_device *device;
down_interruptible(&vpfe_device.device_list_lock); down_interruptible(&vpfe_device.device_list_lock);
list_for_each_entry(device, &vpfe_device.capture_device_list, list_for_each_entry(device, &vpfe_device.capture_device_list,
device_list){ device_list){
...@@ -1106,7 +1107,7 @@ int vpfe_capture_device_unregister(struct vpfe_capture_device *device) ...@@ -1106,7 +1107,7 @@ int vpfe_capture_device_unregister(struct vpfe_capture_device *device)
} }
EXPORT_SYMBOL(vpfe_capture_device_unregister); EXPORT_SYMBOL(vpfe_capture_device_unregister);
static int capture_device_all_unrigister(void) static int capture_device_all_unregister(void)
{ {
int ret = 0; int ret = 0;
struct vpfe_capture_device *device; struct vpfe_capture_device *device;
...@@ -1217,7 +1218,7 @@ static void vpfe_cleanup(void) ...@@ -1217,7 +1218,7 @@ static void vpfe_cleanup(void)
platform_device_unregister(&_vpfe_device); platform_device_unregister(&_vpfe_device);
driver_unregister(&vpfe_driver); driver_unregister(&vpfe_driver);
capture_device_all_unrigister(); capture_device_all_unregister();
/* disable interrupt */ /* disable interrupt */
free_irq(IRQ_VDINT0, &vpfe_device); free_irq(IRQ_VDINT0, &vpfe_device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment