diff options
author | Scott Jiang <scott.jiang.linux@gmail.com> | 2012-11-20 13:49:35 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-26 07:31:55 -0500 |
commit | fab0e8fa432e42d7b5c91a3d4c8af053f291a65a (patch) | |
tree | 41d14349a5acc76eba3af0ef670340572744a40c /drivers/media/platform/blackfin | |
parent | fe0e990b22c24d53793c8cf246f0e535f31a4406 (diff) |
[media] v4l2: blackfin: convert ppi driver to a module
Other drivers can make use of it.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/blackfin')
-rw-r--r-- | drivers/media/platform/blackfin/Kconfig | 6 | ||||
-rw-r--r-- | drivers/media/platform/blackfin/Makefile | 4 | ||||
-rw-r--r-- | drivers/media/platform/blackfin/ppi.c | 7 |
3 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/platform/blackfin/Kconfig b/drivers/media/platform/blackfin/Kconfig index ecd5323768b7..519990e17122 100644 --- a/drivers/media/platform/blackfin/Kconfig +++ b/drivers/media/platform/blackfin/Kconfig | |||
@@ -2,9 +2,13 @@ config VIDEO_BLACKFIN_CAPTURE | |||
2 | tristate "Blackfin Video Capture Driver" | 2 | tristate "Blackfin Video Capture Driver" |
3 | depends on VIDEO_V4L2 && BLACKFIN && I2C | 3 | depends on VIDEO_V4L2 && BLACKFIN && I2C |
4 | select VIDEOBUF2_DMA_CONTIG | 4 | select VIDEOBUF2_DMA_CONTIG |
5 | select VIDEO_BLACKFIN_PPI | ||
5 | help | 6 | help |
6 | V4L2 bridge driver for Blackfin video capture device. | 7 | V4L2 bridge driver for Blackfin video capture device. |
7 | Choose PPI or EPPI as its interface. | 8 | Choose PPI or EPPI as its interface. |
8 | 9 | ||
9 | To compile this driver as a module, choose M here: the | 10 | To compile this driver as a module, choose M here: the |
10 | module will be called bfin_video_capture. | 11 | module will be called bfin_capture. |
12 | |||
13 | config VIDEO_BLACKFIN_PPI | ||
14 | tristate | ||
diff --git a/drivers/media/platform/blackfin/Makefile b/drivers/media/platform/blackfin/Makefile index aa3a0a216387..30421bc23080 100644 --- a/drivers/media/platform/blackfin/Makefile +++ b/drivers/media/platform/blackfin/Makefile | |||
@@ -1,2 +1,2 @@ | |||
1 | bfin_video_capture-objs := bfin_capture.o ppi.o | 1 | obj-$(CONFIG_VIDEO_BLACKFIN_CAPTURE) += bfin_capture.o |
2 | obj-$(CONFIG_VIDEO_BLACKFIN_CAPTURE) += bfin_video_capture.o | 2 | obj-$(CONFIG_VIDEO_BLACKFIN_PPI) += ppi.o |
diff --git a/drivers/media/platform/blackfin/ppi.c b/drivers/media/platform/blackfin/ppi.c index d29592186b02..9374d676f63d 100644 --- a/drivers/media/platform/blackfin/ppi.c +++ b/drivers/media/platform/blackfin/ppi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | ||
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
21 | 22 | ||
22 | #include <asm/bfin_ppi.h> | 23 | #include <asm/bfin_ppi.h> |
@@ -263,9 +264,15 @@ struct ppi_if *ppi_create_instance(const struct ppi_info *info) | |||
263 | pr_info("ppi probe success\n"); | 264 | pr_info("ppi probe success\n"); |
264 | return ppi; | 265 | return ppi; |
265 | } | 266 | } |
267 | EXPORT_SYMBOL(ppi_create_instance); | ||
266 | 268 | ||
267 | void ppi_delete_instance(struct ppi_if *ppi) | 269 | void ppi_delete_instance(struct ppi_if *ppi) |
268 | { | 270 | { |
269 | peripheral_free_list(ppi->info->pin_req); | 271 | peripheral_free_list(ppi->info->pin_req); |
270 | kfree(ppi); | 272 | kfree(ppi); |
271 | } | 273 | } |
274 | EXPORT_SYMBOL(ppi_delete_instance); | ||
275 | |||
276 | MODULE_DESCRIPTION("Analog Devices PPI driver"); | ||
277 | MODULE_AUTHOR("Scott Jiang <Scott.Jiang.Linux@gmail.com>"); | ||
278 | MODULE_LICENSE("GPL v2"); | ||