summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2019-01-15 12:05:41 -0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-05 22:33:14 +0200
commit7aaa76e8a6abc787ffd8f40f39bf406762090641 (patch)
tree1862bb6d620aa940d8fb5fc62a8f75eb7fe6293b /drivers/media
parentfd400e96c599940e4bbbda29d436efc4d4e035c3 (diff)
downloadlinux-stable-7aaa76e8a6abc787ffd8f40f39bf406762090641.tar.gz
linux-stable-7aaa76e8a6abc787ffd8f40f39bf406762090641.tar.bz2
linux-stable-7aaa76e8a6abc787ffd8f40f39bf406762090641.zip
media: mt9m111: set initial frame size other than 0x0
[ Upstream commit 29856308137de1c21eda89411695f4fc6e9780ff ] This driver sets initial frame width and height to 0x0, which is invalid. So set it to selection rectangle bounds instead. This is detected by v4l2-compliance detected. Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/mt9m111.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index efda1aa95ca0..7a7d3969af20 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -1014,6 +1014,8 @@ static int mt9m111_probe(struct i2c_client *client,
mt9m111->rect.top = MT9M111_MIN_DARK_ROWS;
mt9m111->rect.width = MT9M111_MAX_WIDTH;
mt9m111->rect.height = MT9M111_MAX_HEIGHT;
+ mt9m111->width = mt9m111->rect.width;
+ mt9m111->height = mt9m111->rect.height;
mt9m111->fmt = &mt9m111_colour_fmts[0];
mt9m111->lastpage = -1;
mutex_init(&mt9m111->power_lock);