Commit d6885d65 authored by Stefan Brüns's avatar Stefan Brüns Committed by Daniel Vetter

drm/edid: move drm_edid_is_zero to top, make edid argument const

drm_edid_is_zero will be used by drm_edid_block valid, move it up.
raw_edid argument can be const.
Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent e5b5341c
...@@ -1014,6 +1014,14 @@ module_param_named(edid_fixup, edid_fixup, int, 0400); ...@@ -1014,6 +1014,14 @@ module_param_named(edid_fixup, edid_fixup, int, 0400);
MODULE_PARM_DESC(edid_fixup, MODULE_PARM_DESC(edid_fixup,
"Minimum number of valid EDID header bytes (0-8, default 6)"); "Minimum number of valid EDID header bytes (0-8, default 6)");
static bool drm_edid_is_zero(const u8 *in_edid, int length)
{
if (memchr_inv(in_edid, 0, length))
return false;
return true;
}
/** /**
* drm_edid_block_valid - Sanity check the EDID block (base or extension) * drm_edid_block_valid - Sanity check the EDID block (base or extension)
* @raw_edid: pointer to raw EDID block * @raw_edid: pointer to raw EDID block
...@@ -1176,14 +1184,6 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf, ...@@ -1176,14 +1184,6 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
return ret == xfers ? 0 : -1; return ret == xfers ? 0 : -1;
} }
static bool drm_edid_is_zero(u8 *in_edid, int length)
{
if (memchr_inv(in_edid, 0, length))
return false;
return true;
}
static u8 * static u8 *
drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment