Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
sound
/
soc
/
intel
/
atom
/
sst
/
sst_drv_interface.c
diff --git
a/kernel/sound/soc/intel/atom/sst/sst_drv_interface.c
b/kernel/sound/soc/intel/atom/sst/sst_drv_interface.c
index
edc1869
..
ce689c5
100644
(file)
--- a/
kernel/sound/soc/intel/atom/sst/sst_drv_interface.c
+++ b/
kernel/sound/soc/intel/atom/sst/sst_drv_interface.c
@@
-151,6
+151,7
@@
static int sst_power_control(struct device *dev, bool state)
usage_count = GET_USAGE_COUNT(dev);
dev_dbg(ctx->dev, "Enable: pm usage count: %d\n", usage_count);
if (ret < 0) {
usage_count = GET_USAGE_COUNT(dev);
dev_dbg(ctx->dev, "Enable: pm usage count: %d\n", usage_count);
if (ret < 0) {
+ pm_runtime_put_sync(dev);
dev_err(ctx->dev, "Runtime get failed with err: %d\n", ret);
return ret;
}
dev_err(ctx->dev, "Runtime get failed with err: %d\n", ret);
return ret;
}
@@
-204,8
+205,10
@@
static int sst_cdev_open(struct device *dev,
struct intel_sst_drv *ctx = dev_get_drvdata(dev);
retval = pm_runtime_get_sync(ctx->dev);
struct intel_sst_drv *ctx = dev_get_drvdata(dev);
retval = pm_runtime_get_sync(ctx->dev);
- if (retval < 0)
+ if (retval < 0) {
+ pm_runtime_put_sync(ctx->dev);
return retval;
return retval;
+ }
str_id = sst_get_stream(ctx, str_params);
if (str_id > 0) {
str_id = sst_get_stream(ctx, str_params);
if (str_id > 0) {
@@
-533,7
+536,7
@@
static inline int sst_calc_tstamp(struct intel_sst_drv *ctx,
info->buffer_ptr = pointer_samples / substream->runtime->channels;
info->buffer_ptr = pointer_samples / substream->runtime->channels;
- info->pcm_delay = delay_frames
/ substream->runtime->channels
;
+ info->pcm_delay = delay_frames;
dev_dbg(ctx->dev, "buffer ptr %llu pcm_delay rep: %llu\n",
info->buffer_ptr, info->pcm_delay);
return 0;
dev_dbg(ctx->dev, "buffer ptr %llu pcm_delay rep: %llu\n",
info->buffer_ptr, info->pcm_delay);
return 0;
@@
-672,8
+675,10
@@
static int sst_send_byte_stream(struct device *dev,
if (NULL == bytes)
return -EINVAL;
ret_val = pm_runtime_get_sync(ctx->dev);
if (NULL == bytes)
return -EINVAL;
ret_val = pm_runtime_get_sync(ctx->dev);
- if (ret_val < 0)
+ if (ret_val < 0) {
+ pm_runtime_put_sync(ctx->dev);
return ret_val;
return ret_val;
+ }
ret_val = sst_send_byte_stream_mrfld(ctx, bytes);
sst_pm_runtime_put(ctx);
ret_val = sst_send_byte_stream_mrfld(ctx, bytes);
sst_pm_runtime_put(ctx);