summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2017-03-24 13:47:53 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-04-05 15:18:24 -0300
commit2524490c8900e9b0747b16f070de58c8850793e8 (patch)
treecc6b885ee092f0823f6a945bcdccc7653de1783c /drivers
parent0b0b97dcc79fe2b34d320805c4389d87980a0e51 (diff)
[media] staging: st-cec: Use cec_get_drvdata()
Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/st-cec/stih-cec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c
index 3c25638a9610..521206d7aea6 100644
--- a/drivers/staging/media/st-cec/stih-cec.c
+++ b/drivers/staging/media/st-cec/stih-cec.c
@@ -133,7 +133,7 @@ struct stih_cec {
static int stih_cec_adap_enable(struct cec_adapter *adap, bool enable)
{
- struct stih_cec *cec = adap->priv;
+ struct stih_cec *cec = cec_get_drvdata(adap);
if (enable) {
/* The doc says (input TCLK_PERIOD * CEC_CLK_DIV) = 0.1ms */
@@ -189,7 +189,7 @@ static int stih_cec_adap_enable(struct cec_adapter *adap, bool enable)
static int stih_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr)
{
- struct stih_cec *cec = adap->priv;
+ struct stih_cec *cec = cec_get_drvdata(adap);
u32 reg = readl(cec->regs + CEC_ADDR_TABLE);
reg |= 1 << logical_addr;
@@ -205,7 +205,7 @@ static int stih_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr)
static int stih_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg)
{
- struct stih_cec *cec = adap->priv;
+ struct stih_cec *cec = cec_get_drvdata(adap);
int i;
/* Copy message into registers */