Loading drivers/media/platform/msm/synx/synx.c +5 −4 Original line number Diff line number Diff line Loading @@ -1434,7 +1434,7 @@ int synx_register_ops(const struct synx_register_params *params) return -EINVAL; } mutex_lock(&synx_dev->table_lock); mutex_lock(&synx_dev->vtbl_lock); client_ops = &synx_dev->bind_vtbl[params->type]; if (!client_ops->valid) { client_ops->valid = true; Loading @@ -1451,7 +1451,7 @@ int synx_register_ops(const struct synx_register_params *params) client_ops->name); rc = -EINVAL; } mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return rc; } Loading @@ -1466,12 +1466,12 @@ int synx_deregister_ops(const struct synx_register_params *params) return -EINVAL; } mutex_lock(&synx_dev->table_lock); mutex_lock(&synx_dev->vtbl_lock); client_ops = &synx_dev->bind_vtbl[params->type]; memset(client_ops, 0, sizeof(*client_ops)); pr_info("deregistered bind ops for %s\n", params->name); mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return 0; } Loading @@ -1488,6 +1488,7 @@ static int __init synx_init(void) return -ENOMEM; mutex_init(&synx_dev->table_lock); mutex_init(&synx_dev->vtbl_lock); for (idx = 0; idx < SYNX_MAX_OBJS; idx++) spin_lock_init(&synx_dev->row_spinlocks[idx]); Loading drivers/media/platform/msm/synx/synx_private.h +2 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ struct synx_import_data { * synx_ids : Global unique ids * idr_lock : Spin lock for id allocation * dma_context : dma context id * vtbl_lock : Mutex used to lock the bind table * bind_vtbl : Table with registered bind ops for external sync (bind) * client_list : All the synx clients * debugfs_root : Root directory for debugfs Loading @@ -218,6 +219,7 @@ struct synx_device { struct idr synx_ids; spinlock_t idr_lock; u64 dma_context; struct mutex vtbl_lock; struct synx_registered_ops bind_vtbl[SYNX_MAX_BIND_TYPES]; struct list_head client_list; struct dentry *debugfs_root; Loading drivers/media/platform/msm/synx/synx_util.c +3 −3 Original line number Diff line number Diff line Loading @@ -739,14 +739,14 @@ struct bind_operations *synx_get_bind_ops(u32 type) if (!is_valid_type(type)) return NULL; mutex_lock(&synx_dev->table_lock); mutex_lock(&synx_dev->vtbl_lock); client_ops = &synx_dev->bind_vtbl[type]; if (!client_ops->valid) { mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return NULL; } pr_debug("found bind ops for %s\n", client_ops->name); mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return &client_ops->ops; } Loading Loading
drivers/media/platform/msm/synx/synx.c +5 −4 Original line number Diff line number Diff line Loading @@ -1434,7 +1434,7 @@ int synx_register_ops(const struct synx_register_params *params) return -EINVAL; } mutex_lock(&synx_dev->table_lock); mutex_lock(&synx_dev->vtbl_lock); client_ops = &synx_dev->bind_vtbl[params->type]; if (!client_ops->valid) { client_ops->valid = true; Loading @@ -1451,7 +1451,7 @@ int synx_register_ops(const struct synx_register_params *params) client_ops->name); rc = -EINVAL; } mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return rc; } Loading @@ -1466,12 +1466,12 @@ int synx_deregister_ops(const struct synx_register_params *params) return -EINVAL; } mutex_lock(&synx_dev->table_lock); mutex_lock(&synx_dev->vtbl_lock); client_ops = &synx_dev->bind_vtbl[params->type]; memset(client_ops, 0, sizeof(*client_ops)); pr_info("deregistered bind ops for %s\n", params->name); mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return 0; } Loading @@ -1488,6 +1488,7 @@ static int __init synx_init(void) return -ENOMEM; mutex_init(&synx_dev->table_lock); mutex_init(&synx_dev->vtbl_lock); for (idx = 0; idx < SYNX_MAX_OBJS; idx++) spin_lock_init(&synx_dev->row_spinlocks[idx]); Loading
drivers/media/platform/msm/synx/synx_private.h +2 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ struct synx_import_data { * synx_ids : Global unique ids * idr_lock : Spin lock for id allocation * dma_context : dma context id * vtbl_lock : Mutex used to lock the bind table * bind_vtbl : Table with registered bind ops for external sync (bind) * client_list : All the synx clients * debugfs_root : Root directory for debugfs Loading @@ -218,6 +219,7 @@ struct synx_device { struct idr synx_ids; spinlock_t idr_lock; u64 dma_context; struct mutex vtbl_lock; struct synx_registered_ops bind_vtbl[SYNX_MAX_BIND_TYPES]; struct list_head client_list; struct dentry *debugfs_root; Loading
drivers/media/platform/msm/synx/synx_util.c +3 −3 Original line number Diff line number Diff line Loading @@ -739,14 +739,14 @@ struct bind_operations *synx_get_bind_ops(u32 type) if (!is_valid_type(type)) return NULL; mutex_lock(&synx_dev->table_lock); mutex_lock(&synx_dev->vtbl_lock); client_ops = &synx_dev->bind_vtbl[type]; if (!client_ops->valid) { mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return NULL; } pr_debug("found bind ops for %s\n", client_ops->name); mutex_unlock(&synx_dev->table_lock); mutex_unlock(&synx_dev->vtbl_lock); return &client_ops->ops; } Loading