summaryrefslogtreecommitdiff
path: root/lib/igt_chamelium.c
diff options
context:
space:
mode:
authorSimon Ser <simon.ser@intel.com>2019-07-19 13:48:27 +0300
committerSimon Ser <simon.ser@intel.com>2019-08-15 13:03:48 +0300
commit8a7b044493e8dcdd7df02a124ea14daf95752cec (patch)
treec3167969f34de3739fc79c91828456273a99cb34 /lib/igt_chamelium.c
parent81df2f22385bc275975cf199d962eed9bc10f916 (diff)
lib/igt_kms: use struct edid instead of unsigned char
This has several advantages: * No more need to convert back and forth between these two (everybody should use struct edid, the exception being lib/tests/igt_edid which performs sanity checks) * Makes it clearer that users can call edid_get_size on a returned EDID blob * Improves type safety (it's more obvious is a random blob is used as an EDID) Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_chamelium.c')
-rw-r--r--lib/igt_chamelium.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index a09473d0..49ddadfb 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -562,10 +562,9 @@ static void chamelium_destroy_edid(struct chamelium *chamelium, int edid_id)
* Returns: An opaque pointer to the Chamelium EDID
*/
struct chamelium_edid *chamelium_new_edid(struct chamelium *chamelium,
- const unsigned char *raw_edid)
+ const struct edid *edid)
{
struct chamelium_edid *chamelium_edid;
- const struct edid *edid = (struct edid *) raw_edid;
size_t edid_size = edid_get_size(edid);
chamelium_edid = calloc(1, sizeof(struct chamelium_edid));