Commit 95d2608b authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] em28xx: start moving em28xx-v4l specific data to its own struct

That reduces a little bit the memory footprint when em28xx-video
is not loaded.
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent ad298055
...@@ -365,7 +365,7 @@ int em28xx_init_camera(struct em28xx *dev) ...@@ -365,7 +365,7 @@ int em28xx_init_camera(struct em28xx *dev)
dev->sensor_xtal = 4300000; dev->sensor_xtal = 4300000;
pdata.xtal = dev->sensor_xtal; pdata.xtal = dev->sensor_xtal;
if (NULL == if (NULL ==
v4l2_i2c_new_subdev_board(&dev->v4l2_dev, adap, v4l2_i2c_new_subdev_board(&dev->v4l2->v4l2_dev, adap,
&mt9v011_info, NULL)) { &mt9v011_info, NULL)) {
ret = -ENODEV; ret = -ENODEV;
break; break;
...@@ -422,7 +422,7 @@ int em28xx_init_camera(struct em28xx *dev) ...@@ -422,7 +422,7 @@ int em28xx_init_camera(struct em28xx *dev)
dev->sensor_yres = 480; dev->sensor_yres = 480;
subdev = subdev =
v4l2_i2c_new_subdev_board(&dev->v4l2_dev, adap, v4l2_i2c_new_subdev_board(&dev->v4l2->v4l2_dev, adap,
&ov2640_info, NULL); &ov2640_info, NULL);
if (NULL == subdev) { if (NULL == subdev) {
ret = -ENODEV; ret = -ENODEV;
......
This diff is collapsed.
...@@ -498,6 +498,12 @@ struct em28xx_eeprom { ...@@ -498,6 +498,12 @@ struct em28xx_eeprom {
#define EM28XX_RESOURCE_VIDEO 0x01 #define EM28XX_RESOURCE_VIDEO 0x01
#define EM28XX_RESOURCE_VBI 0x02 #define EM28XX_RESOURCE_VBI 0x02
struct em28xx_v4l2 {
struct kref ref;
struct v4l2_device v4l2_dev;
};
struct em28xx_audio { struct em28xx_audio {
char name[50]; char name[50];
unsigned num_urb; unsigned num_urb;
...@@ -543,6 +549,7 @@ struct em28xx { ...@@ -543,6 +549,7 @@ struct em28xx {
struct kref ref; struct kref ref;
/* Sub-module data */ /* Sub-module data */
struct em28xx_v4l2 *v4l2;
struct em28xx_dvb *dvb; struct em28xx_dvb *dvb;
struct em28xx_audio adev; struct em28xx_audio adev;
struct em28xx_IR *ir; struct em28xx_IR *ir;
...@@ -560,7 +567,6 @@ struct em28xx { ...@@ -560,7 +567,6 @@ struct em28xx {
unsigned int has_alsa_audio:1; unsigned int has_alsa_audio:1;
unsigned int is_audio_only:1; unsigned int is_audio_only:1;
struct v4l2_device v4l2_dev;
struct v4l2_ctrl_handler ctrl_handler; struct v4l2_ctrl_handler ctrl_handler;
struct v4l2_clk *clk; struct v4l2_clk *clk;
struct em28xx_board board; struct em28xx_board board;
......
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