aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hsi/clients/hsi_char.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hsi/clients/hsi_char.c')
-rw-r--r--drivers/hsi/clients/hsi_char.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c
index 30733209fde2..57f70c28fa38 100644
--- a/drivers/hsi/clients/hsi_char.c
+++ b/drivers/hsi/clients/hsi_char.c
@@ -367,7 +367,7 @@ static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc)
367 return -EINVAL; 367 return -EINVAL;
368 tmp = cl->rx_cfg; 368 tmp = cl->rx_cfg;
369 cl->rx_cfg.mode = rxc->mode; 369 cl->rx_cfg.mode = rxc->mode;
370 cl->rx_cfg.channels = rxc->channels; 370 cl->rx_cfg.num_hw_channels = rxc->channels;
371 cl->rx_cfg.flow = rxc->flow; 371 cl->rx_cfg.flow = rxc->flow;
372 ret = hsi_setup(cl); 372 ret = hsi_setup(cl);
373 if (ret < 0) { 373 if (ret < 0) {
@@ -383,7 +383,7 @@ static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc)
383static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc) 383static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc)
384{ 384{
385 rxc->mode = cl->rx_cfg.mode; 385 rxc->mode = cl->rx_cfg.mode;
386 rxc->channels = cl->rx_cfg.channels; 386 rxc->channels = cl->rx_cfg.num_hw_channels;
387 rxc->flow = cl->rx_cfg.flow; 387 rxc->flow = cl->rx_cfg.flow;
388} 388}
389 389
@@ -402,7 +402,7 @@ static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc)
402 return -EINVAL; 402 return -EINVAL;
403 tmp = cl->tx_cfg; 403 tmp = cl->tx_cfg;
404 cl->tx_cfg.mode = txc->mode; 404 cl->tx_cfg.mode = txc->mode;
405 cl->tx_cfg.channels = txc->channels; 405 cl->tx_cfg.num_hw_channels = txc->channels;
406 cl->tx_cfg.speed = txc->speed; 406 cl->tx_cfg.speed = txc->speed;
407 cl->tx_cfg.arb_mode = txc->arb_mode; 407 cl->tx_cfg.arb_mode = txc->arb_mode;
408 ret = hsi_setup(cl); 408 ret = hsi_setup(cl);
@@ -417,7 +417,7 @@ static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc)
417static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc) 417static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc)
418{ 418{
419 txc->mode = cl->tx_cfg.mode; 419 txc->mode = cl->tx_cfg.mode;
420 txc->channels = cl->tx_cfg.channels; 420 txc->channels = cl->tx_cfg.num_hw_channels;
421 txc->speed = cl->tx_cfg.speed; 421 txc->speed = cl->tx_cfg.speed;
422 txc->arb_mode = cl->tx_cfg.arb_mode; 422 txc->arb_mode = cl->tx_cfg.arb_mode;
423} 423}
@@ -435,7 +435,7 @@ static ssize_t hsc_read(struct file *file, char __user *buf, size_t len,
435 return -EINVAL; 435 return -EINVAL;
436 if (len > max_data_size) 436 if (len > max_data_size)
437 len = max_data_size; 437 len = max_data_size;
438 if (channel->ch >= channel->cl->rx_cfg.channels) 438 if (channel->ch >= channel->cl->rx_cfg.num_hw_channels)
439 return -ECHRNG; 439 return -ECHRNG;
440 if (test_and_set_bit(HSC_CH_READ, &channel->flags)) 440 if (test_and_set_bit(HSC_CH_READ, &channel->flags))
441 return -EBUSY; 441 return -EBUSY;
@@ -492,7 +492,7 @@ static ssize_t hsc_write(struct file *file, const char __user *buf, size_t len,
492 return -EINVAL; 492 return -EINVAL;
493 if (len > max_data_size) 493 if (len > max_data_size)
494 len = max_data_size; 494 len = max_data_size;
495 if (channel->ch >= channel->cl->tx_cfg.channels) 495 if (channel->ch >= channel->cl->tx_cfg.num_hw_channels)
496 return -ECHRNG; 496 return -ECHRNG;
497 if (test_and_set_bit(HSC_CH_WRITE, &channel->flags)) 497 if (test_and_set_bit(HSC_CH_WRITE, &channel->flags))
498 return -EBUSY; 498 return -EBUSY;