Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57da8019 authored by Jose Abreu's avatar Jose Abreu Committed by Gerrit - the friendly Code Review server
Browse files

[media] cec: Add cec_get_drvdata()



Add a helper function to get driver private data from CEC
adapter. This helps the readability a little bit and allows
to change the 'priv' field name to something else without
needing to touch all drivers.

Change-Id: I280a4e203b4918c5bc194e3618d9733d8c8fb175
Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 0b0b97dcc79fe2b34d320805c4389d87980a0e51
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarVenkata Prahlad Valluru <vvalluru@codeaurora.org>
parent 63d61b62
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -186,6 +186,11 @@ struct cec_adapter {
	char input_drv[32];
};

static inline void *cec_get_drvdata(const struct cec_adapter *adap)
{
	return adap->priv;
}

static inline bool cec_has_log_addr(const struct cec_adapter *adap, u8 log_addr)
{
	return adap->log_addrs.log_addr_mask & (1 << log_addr);