diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-22 12:29:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-26 09:10:39 -0300 |
commit | 4b208f8b561ffa5f3b7f6887bf8dc3038c67eee9 (patch) | |
tree | aec968b379c658f378a6441772bbef5a04d4571e /drivers/media/common | |
parent | fb372a434d47f636bc8277e7e91e0f2855a14263 (diff) |
[media] siano: register media controller earlier
We need to initialize the media controller earlier, as the core
will call the smsdvb hotplug during register time. Ok, this is
an async operation, so, when the module is not loaded, the media
controller works.
However, if the module is already loaded, nothing will be
registered at the media controller, as it will load too late.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/siano/smscoreapi.c | 7 | ||||
-rw-r--r-- | drivers/media/common/siano/smscoreapi.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index cb7515ba2193..2a8d9a36d6f0 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c @@ -653,7 +653,8 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, * @return 0 on success, <0 on error. */ int smscore_register_device(struct smsdevice_params_t *params, - struct smscore_device_t **coredev) + struct smscore_device_t **coredev, + void *mdev) { struct smscore_device_t *dev; u8 *buffer; @@ -662,6 +663,10 @@ int smscore_register_device(struct smsdevice_params_t *params, if (!dev) return -ENOMEM; +#ifdef CONFIG_MEDIA_CONTROLLER_DVB + dev->media_dev = mdev; +#endif + /* init list entry so it could be safe in smscore_unregister_device */ INIT_LIST_HEAD(&dev->entry); diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h index 6ff8f64a3794..eb8bd689b936 100644 --- a/drivers/media/common/siano/smscoreapi.h +++ b/drivers/media/common/siano/smscoreapi.h @@ -1123,7 +1123,8 @@ extern int smscore_register_hotplug(hotplug_t hotplug); extern void smscore_unregister_hotplug(hotplug_t hotplug); extern int smscore_register_device(struct smsdevice_params_t *params, - struct smscore_device_t **coredev); + struct smscore_device_t **coredev, + void *mdev); extern void smscore_unregister_device(struct smscore_device_t *coredev); extern int smscore_start_device(struct smscore_device_t *coredev); |