aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/m5mols (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-10-10[media] m5mols: Add missing #include <linux/sizes.h>Sylwester Nawrocki1-0/+1
Include <linux/sizes.h> header that is missing after commit ab7ef22419927 "[media] m5mols: Implement .get_frame_desc subdev callback". It prevents possible build errors due to undefined SZ_1M. This header is currently included only when m5mols is compiled on arm; if build on other archs, the compilation will break. Reported-by: Jan Hoogenraad <jan-conceptronic@hoogenraad.net> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05[media] m5mols: Implement .get_frame_desc subdev callbackSylwester Nawrocki4-0/+60
.get_frame_desc can be used by host interface driver to query properties of captured frames, e.g. required memory buffer size. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] m5mols: Protect driver data with a mutexSylwester Nawrocki2-33/+62
Without the locking the driver's data could get corrupted when the subdev is accessed from user space and from host driver by multiple processes. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] m5mols: Remove unneeded control ops assignmentsSylwester Nawrocki1-7/+0
Since all host drivers using this subdev are already using the control framework these compatibility ops can be removed. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_modeSylwester Nawrocki2-4/+4
Fixes following warnings on 64-bit architectures: m5mols.h: In function 'm5mols_set_ctrl_mode': m5mols.h:326:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] m5mols.h: In function 'm5mols_get_ctrl_mode': m5mols.h:331:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/media/i2c/m5mols/m5mols_controls.c:466:2: warning: cast from pointer to integer of different size Cc: Heungjun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01[media] m5mols: Add missing free_irq() on error pathSylwester Nawrocki1-1/+3
Make sure the interrupt is freed when driver probing fails. Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-14[media] m5mols: introduce missing initializationJulia Lawall1-1/+1
The result of one call to a function is tested, and then at the second call to the same function, the previous result, and not the current result, is tested again. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ret; identifier f; statement S1,S2; @@ *ret = f(...); if (\(ret != 0\|ret < 0\|ret == NULL\)) S1 ... when any *f(...); if (\(ret != 0\|ret < 0\|ret == NULL\)) S2 // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move i2c files into drivers/media/i2cMauro Carvalho Chehab7-0/+2478
Move ancillary I2C drivers into drivers/media/i2c, in order to better organize them. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>