diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-09-13 08:00:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-16 08:21:46 +0200 |
commit | 6e087eae89df5f9904fe07e5bb31d33ae3140fb2 (patch) | |
tree | b497561c8453470aae93c3cc722ad327617bd91a /drivers/media | |
parent | 851308450a8f38f9f9b0b6591edd4ae286d4442f (diff) | |
download | linux-stable-6e087eae89df5f9904fe07e5bb31d33ae3140fb2.tar.gz linux-stable-6e087eae89df5f9904fe07e5bb31d33ae3140fb2.tar.bz2 linux-stable-6e087eae89df5f9904fe07e5bb31d33ae3140fb2.zip |
media: cec: remove cec-edid.c
[ Upstream commit f94d463f1b7f83d465ed77521821583dbcdaa3c5 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/cec/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/cec/cec-adap.c | 13 | ||||
-rw-r--r-- | drivers/media/cec/cec-edid.c | 24 |
3 files changed, 14 insertions, 25 deletions
diff --git a/drivers/media/cec/Makefile b/drivers/media/cec/Makefile index 29a2ab9e77c5..ad8677d8c896 100644 --- a/drivers/media/cec/Makefile +++ b/drivers/media/cec/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -cec-objs := cec-core.o cec-adap.o cec-api.o cec-edid.o +cec-objs := cec-core.o cec-adap.o cec-api.o ifeq ($(CONFIG_CEC_NOTIFIER),y) cec-objs += cec-notifier.o diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c index a7ea27d2aa8e..4a15d53f659e 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. diff --git a/drivers/media/cec/cec-edid.c b/drivers/media/cec/cec-edid.c deleted file mode 100644 index e2f54eec0829..000000000000 --- a/drivers/media/cec/cec-edid.c +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * cec-edid - HDMI Consumer Electronics Control EDID & CEC helper functions - * - * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. - */ - -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/types.h> -#include <media/cec.h> - -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); |