diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2014-11-30 13:57:41 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-12-01 10:50:18 -0500 |
commit | d6885d6590378cfe564a3eaca2e26ba617b25f71 (patch) | |
tree | 7b2efa81a61f29288390e0dadccbe6aeaa66a783 | |
parent | e5b5341c28c66a122982d3d8822a4f9a0938f923 (diff) |
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: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 3bf999134bcc..f8fb327407cd 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -1014,6 +1014,14 @@ module_param_named(edid_fixup, edid_fixup, int, 0400); | |||
1014 | MODULE_PARM_DESC(edid_fixup, | 1014 | MODULE_PARM_DESC(edid_fixup, |
1015 | "Minimum number of valid EDID header bytes (0-8, default 6)"); | 1015 | "Minimum number of valid EDID header bytes (0-8, default 6)"); |
1016 | 1016 | ||
1017 | static bool drm_edid_is_zero(const u8 *in_edid, int length) | ||
1018 | { | ||
1019 | if (memchr_inv(in_edid, 0, length)) | ||
1020 | return false; | ||
1021 | |||
1022 | return true; | ||
1023 | } | ||
1024 | |||
1017 | /** | 1025 | /** |
1018 | * drm_edid_block_valid - Sanity check the EDID block (base or extension) | 1026 | * drm_edid_block_valid - Sanity check the EDID block (base or extension) |
1019 | * @raw_edid: pointer to raw EDID block | 1027 | * @raw_edid: pointer to raw EDID block |
@@ -1176,14 +1184,6 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf, | |||
1176 | return ret == xfers ? 0 : -1; | 1184 | return ret == xfers ? 0 : -1; |
1177 | } | 1185 | } |
1178 | 1186 | ||
1179 | static bool drm_edid_is_zero(u8 *in_edid, int length) | ||
1180 | { | ||
1181 | if (memchr_inv(in_edid, 0, length)) | ||
1182 | return false; | ||
1183 | |||
1184 | return true; | ||
1185 | } | ||
1186 | |||
1187 | static u8 * | 1187 | static u8 * |
1188 | drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) | 1188 | drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) |
1189 | { | 1189 | { |