diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-09-13 08:00:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-24 09:11:06 -0400 |
commit | f94d463f1b7f83d465ed77521821583dbcdaa3c5 (patch) | |
tree | 39709af389e0f4658b6737d17f1526d094b2ea71 /drivers/media/cec/cec-adap.c | |
parent | 9cfd2753f8f3923f89cbb15f940f3aa0e7202d3e (diff) | |
download | talos-op-linux-f94d463f1b7f83d465ed77521821583dbcdaa3c5.tar.gz talos-op-linux-f94d463f1b7f83d465ed77521821583dbcdaa3c5.zip |
media: cec: remove cec-edid.c
Move cec_get_edid_phys_addr() to cec-adap.c. It's not worth keeping
a separate source for this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v4.17 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/cec/cec-adap.c')
-rw-r--r-- | drivers/media/cec/cec-adap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index 030b2602faf0..829878356e1e 100644 --- a/drivers/media/cec/cec-adap.c +++ b/drivers/media/cec/cec-adap.c @@ -62,6 +62,19 @@ static unsigned int cec_log_addr2dev(const struct cec_adapter *adap, u8 log_addr return adap->log_addrs.primary_device_type[i < 0 ? 0 : i]; } +u16 cec_get_edid_phys_addr(const u8 *edid, unsigned int size, + unsigned int *offset) +{ + unsigned int loc = cec_get_edid_spa_location(edid, size); + + if (offset) + *offset = loc; + if (loc == 0) + return CEC_PHYS_ADDR_INVALID; + return (edid[loc] << 8) | edid[loc + 1]; +} +EXPORT_SYMBOL_GPL(cec_get_edid_phys_addr); + /* * Queue a new event for this filehandle. If ts == 0, then set it * to the current time. |